Разделение методов создания и обновления элементов, добавление полей author, description, service_name. Исправление бага при котором не удалялось апи. Удаление из ответа лишних полей __v и _id
This commit is contained in:
@ -8,19 +8,15 @@ export class StoreRequest {
|
||||
|
||||
@ApiProperty()
|
||||
value: any;
|
||||
}
|
||||
export class StoreResponse {
|
||||
@ApiProperty()
|
||||
key: string;
|
||||
|
||||
@ApiProperty()
|
||||
value: any;
|
||||
description: string;
|
||||
|
||||
@ApiProperty()
|
||||
_id: string;
|
||||
service_name: string;
|
||||
|
||||
@ApiProperty()
|
||||
__v: number;
|
||||
author: string;
|
||||
}
|
||||
|
||||
@Schema()
|
||||
@ -37,6 +33,24 @@ export class Store extends Document {
|
||||
type: {}
|
||||
})
|
||||
value: any;
|
||||
|
||||
@Prop({
|
||||
required: true,
|
||||
type: String,
|
||||
})
|
||||
description: string;
|
||||
|
||||
@Prop({
|
||||
required: true,
|
||||
type: String,
|
||||
})
|
||||
service_name: string;
|
||||
|
||||
@Prop({
|
||||
required: true,
|
||||
type: String,
|
||||
})
|
||||
author: string;
|
||||
}
|
||||
|
||||
export const StoreSchema = SchemaFactory.createForClass(Store);
|
||||
|
||||
Reference in New Issue
Block a user