diff --git a/src/product/product.controller.ts b/src/product/product.controller.ts index 0539d81..f26f7e0 100644 --- a/src/product/product.controller.ts +++ b/src/product/product.controller.ts @@ -77,8 +77,8 @@ export class ProductController { ) { const data = await this.productService.findAll( page, - JSON.parse(supplier), - JSON.parse(subcategory), + supplier == 'null' ? null : supplier, + subcategory == 'null' ? null : subcategory, ); return { @@ -161,7 +161,7 @@ export class ProductController { ) { const data = await this.productSubCategoriesService.findAll( page, - JSON.parse(category), + category == 'null' ? null : category, ); return {