feat: rewrite filter for product again
This commit is contained in:
parent
d9ca0888e7
commit
15945fa408
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user