feat: rewrite filter for product again
This commit is contained in:
@@ -75,7 +75,11 @@ export class ProductController {
|
||||
@Query('sub-category') subcategory: string,
|
||||
@Query('supplier') supplier: string,
|
||||
) {
|
||||
const data = await this.productService.findAll(page, supplier, subcategory);
|
||||
const data = await this.productService.findAll(
|
||||
page,
|
||||
JSON.parse(supplier),
|
||||
JSON.parse(subcategory),
|
||||
);
|
||||
|
||||
return {
|
||||
...data,
|
||||
@@ -155,7 +159,10 @@ export class ProductController {
|
||||
@Query('page') page: number,
|
||||
@Query('category') category: string,
|
||||
) {
|
||||
const data = await this.productSubCategoriesService.findAll(page, category);
|
||||
const data = await this.productSubCategoriesService.findAll(
|
||||
page,
|
||||
JSON.parse(category),
|
||||
);
|
||||
|
||||
return {
|
||||
...data,
|
||||
|
Reference in New Issue
Block a user