This commit is contained in:
2026-02-09 12:45:05 +03:30
parent 837614bc31
commit a01dba1508
@@ -51,9 +51,10 @@ export class CategoryService {
} }
async findAllByShopId(shopId: string): Promise<Category[]> { async findAllByShopId(shopId: string): Promise<Category[]> {
console.log('findAllByShopId',shopId)
return this.categoryRepository.find( return this.categoryRepository.find(
{ shop: { id: shopId } }, { shop: { id: shopId } },
{ orderBy: { order: 'asc' }, populate: ['children','parent'] }); { orderBy: { createdAt: 'DESC' }, populate: ['children','parent'] });
} }
async findOne(shopId: string, categoryId: string): Promise<Category> { async findOne(shopId: string, categoryId: string): Promise<Category> {