diff --git a/src/routes/productRoute.ts b/src/routes/productRoute.ts index 57278fa..efbc283 100644 --- a/src/routes/productRoute.ts +++ b/src/routes/productRoute.ts @@ -284,6 +284,14 @@ export class ProductRoute extends BaseRoute { } } */ + /* + #swagger.responses[200] = { + description:'OK', + schema:{ + $ref: "#/definitions/DeleteProductsSuccess" + } + } + */ UserVerify, IsAdmin, this.usePipe(DeleteProductsPipe), diff --git a/src/swagger/definition/index.ts b/src/swagger/definition/index.ts index 897af03..eadaa10 100644 --- a/src/swagger/definition/index.ts +++ b/src/swagger/definition/index.ts @@ -39,7 +39,7 @@ import { CustomGetProductTagQuery, GetProductDetailSuccess, GetProductsSuccess, - CustomDeleteProductsObj, + CustomDeleteProductsObj,DeleteProductsSuccess } from './product'; import { CreateGroupSuccess, @@ -69,7 +69,7 @@ export const definitions = { CreateGroupSuccess, UploadFileSuccess, GetProductDetailSuccess, - GetProductsSuccess, + GetProductsSuccess,DeleteProductsSuccess }; export const customDefinitions = { diff --git a/src/swagger/definition/product.ts b/src/swagger/definition/product.ts index acbb780..5a4e817 100644 --- a/src/swagger/definition/product.ts +++ b/src/swagger/definition/product.ts @@ -221,6 +221,14 @@ export const GetProductsSuccess = { }, }; +export const DeleteProductsSuccess = { + $status: CustomResponseType.OK, + $message: CustomResponseType.OK_MESSAGE, + $data: { + $deletedCount: 1, + }, +}; + export const FindProductSuccess = { $status: CustomResponseType.OK, $message: CustomResponseType.OK_MESSAGE,