category
This commit is contained in:
@@ -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> {
|
||||||
|
|||||||
Reference in New Issue
Block a user