diff --git a/src/product/product.service.ts b/src/product/product.service.ts index 57f96dc..7138d13 100644 --- a/src/product/product.service.ts +++ b/src/product/product.service.ts @@ -72,16 +72,16 @@ export class ProductService { ); if (subCategories != 'null' && subCategories) { - baseQuery.where('product.sub_categories_id = :id', { + baseQuery.andWhere('product.sub_categories_id = :id', { id: subCategories, }); } - if (categories != 'null' && categories) { - baseQuery.where('sub_categories.category_id = :id', { - id: categories, - }); - } + // if (categories != 'null' && categories) { + // baseQuery.andWhere('sub_categories.category_id = :id', { + // id: categories, + // }); + // } const data = await baseQuery .skip(page * 10)