移除一些打印信息
This commit is contained in:
parent
1294402a36
commit
5549c8c804
@ -73,7 +73,7 @@ export class ApiServer {
|
|||||||
fs.readdirSync(controllers)
|
fs.readdirSync(controllers)
|
||||||
.filter((file: string) => ~file.search(/^[^.].*\.(ts|js)$/))
|
.filter((file: string) => ~file.search(/^[^.].*\.(ts|js)$/))
|
||||||
.forEach((file: any) => {
|
.forEach((file: any) => {
|
||||||
logger.log(file);
|
// logger.log(file);
|
||||||
return require(join(controllers, file))});
|
return require(join(controllers, file))});
|
||||||
}
|
}
|
||||||
async connectDB() {
|
async connectDB() {
|
||||||
|
@ -22,7 +22,6 @@ export class NoJsonClass {
|
|||||||
export function noJson() {
|
export function noJson() {
|
||||||
// return Reflect.metadata(noJsonMetadataKey, !0)
|
// return Reflect.metadata(noJsonMetadataKey, !0)
|
||||||
return function(target: Object, propertyKey: string) {
|
return function(target: Object, propertyKey: string) {
|
||||||
console.log(target)
|
|
||||||
new NoJsonClass().addKey(target.constructor.name, propertyKey)
|
new NoJsonClass().addKey(target.constructor.name, propertyKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
arrayProp,
|
|
||||||
getModelForClass,
|
getModelForClass,
|
||||||
index,
|
index,
|
||||||
modelOptions,
|
modelOptions,
|
||||||
@ -52,7 +51,7 @@ class AccountClass extends BaseModule{
|
|||||||
public lockedTime?: Date;
|
public lockedTime?: Date;
|
||||||
@prop()
|
@prop()
|
||||||
public comment?: string;
|
public comment?: string;
|
||||||
@arrayProp({ items: String })
|
@prop({ type: () => [String], default: [] })
|
||||||
public friends: string[];
|
public friends: string[];
|
||||||
@prop()
|
@prop()
|
||||||
public lastLogin?: Date;
|
public lastLogin?: Date;
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import {
|
import { getModelForClass, modelOptions, prop } from '@typegoose/typegoose'
|
||||||
arrayProp,
|
import { dbconn } from '../decorators/dbconn'
|
||||||
getModelForClass,
|
import { Base, TimeStamps } from '@typegoose/typegoose/lib/defaultClasses'
|
||||||
modelOptions,
|
|
||||||
prop
|
|
||||||
} from '@typegoose/typegoose';
|
|
||||||
import {dbconn} from '../decorators/dbconn';
|
|
||||||
import {Base, TimeStamps} from "@typegoose/typegoose/lib/defaultClasses";
|
|
||||||
|
|
||||||
@modelOptions({schemaOptions: {_id: false}})
|
@modelOptions({schemaOptions: {_id: false}})
|
||||||
export class PlatInfo {
|
export class PlatInfo {
|
||||||
@ -38,7 +33,7 @@ class AppClass extends Base<string>{
|
|||||||
public name: string;
|
public name: string;
|
||||||
@prop()
|
@prop()
|
||||||
public icon: string;
|
public icon: string;
|
||||||
@arrayProp({ items: PlatInfo })
|
@prop({ type: () => [PlatInfo], default: [] })
|
||||||
public plats?: PlatInfo[];
|
public plats?: PlatInfo[];
|
||||||
@prop()
|
@prop()
|
||||||
public comment?: string;
|
public comment?: string;
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { dbconn } from '../../decorators/dbconn'
|
import { dbconn } from '../../decorators/dbconn'
|
||||||
import { getModelForClass, modelOptions, prop } from '@typegoose/typegoose'
|
import { getModelForClass, modelOptions, prop } from '@typegoose/typegoose'
|
||||||
import { BaseModule } from '../Base'
|
import { BaseModule } from '../Base'
|
||||||
|
import { Severity } from '@typegoose/typegoose/lib/internal/constants'
|
||||||
|
|
||||||
|
@modelOptions({
|
||||||
|
options: {allowMixed: Severity.ALLOW}
|
||||||
|
})
|
||||||
export class PuzzleStatusClass {
|
export class PuzzleStatusClass {
|
||||||
|
|
||||||
@prop({default: []})
|
@prop({default: []})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user