diff --git a/src/controllers/admin/product.controller.ts b/src/controllers/admin/product.controller.ts index 2141d6c..f04635f 100644 --- a/src/controllers/admin/product.controller.ts +++ b/src/controllers/admin/product.controller.ts @@ -42,7 +42,7 @@ export const getEditProduct = async (req: Request, res: Response) => { export const postAddProduct = async (req: Request, res: Response) => { const productInput = plainToInstance(ProductDto, { ...req.body, - group: '622a00966a1a8eadda16cebb', + group: '622a00966a1a8eadda16cebb', // TODO: remove hardcoded id }); const errors = await validate(productInput); @@ -107,7 +107,6 @@ export const postEditProduct = async (req: Request, res: Response) => { export const deleteProduct = async (req: Request, res: Response) => { const id = req.body.productId; - console.log(`id: ${id}`); if (!isValidObjectId(id)) { req.flash('error', 'Product not found'); diff --git a/src/core/api/product.api.ts b/src/core/api/product.api.ts index 18fe189..17aa67f 100644 --- a/src/core/api/product.api.ts +++ b/src/core/api/product.api.ts @@ -40,8 +40,6 @@ class ProductApi { } static async deleteProduct(id: string): Promise { - console.log('deleteProduct', id); - return await productsModel.findByIdAndDelete(id).lean(); }