diff --git a/src/modules/products/providers/category.service.ts b/src/modules/products/providers/category.service.ts index 7f41862..9c87798 100644 --- a/src/modules/products/providers/category.service.ts +++ b/src/modules/products/providers/category.service.ts @@ -51,9 +51,10 @@ export class CategoryService { } async findAllByShopId(shopId: string): Promise { + console.log('findAllByShopId',shopId) return this.categoryRepository.find( { shop: { id: shopId } }, - { orderBy: { order: 'asc' }, populate: ['children','parent'] }); + { orderBy: { createdAt: 'DESC' }, populate: ['children','parent'] }); } async findOne(shopId: string, categoryId: string): Promise {