foods and ctegory

This commit is contained in:
2025-11-22 14:36:07 +03:30
parent 7a53f0fa1b
commit ee723c1c55
4 changed files with 42 additions and 1 deletions
@@ -70,6 +70,10 @@ export class FoodService {
return this.foodRepository.findAllPaginated(restId, dto);
}
async findAllByRestaurant(restId: string): Promise<Food[]> {
return this.foodRepository.find({ restaurant: { id: restId } });
}
findOne(id: string) {
return this.foodRepository.findOne({ id }, { populate: ['categories'] });
}