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( const data = await this.productService.findAll(
page, page,
JSON.parse(supplier), supplier == 'null' ? null : supplier,
JSON.parse(subcategory), subcategory == 'null' ? null : subcategory,
); );
return { return {
@ -161,7 +161,7 @@ export class ProductController {
) { ) {
const data = await this.productSubCategoriesService.findAll( const data = await this.productSubCategoriesService.findAll(
page, page,
JSON.parse(category), category == 'null' ? null : category,
); );
return { return {