feat: rewrite filter for product again

This commit is contained in:
caturbgs 2021-12-22 14:34:49 +07:00
parent a17d6922ce
commit 16058db62c

View File

@ -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 {