foods
This commit is contained in:
@@ -70,8 +70,12 @@ export class FoodService {
|
||||
return this.foodRepository.findAllPaginated(restId, dto);
|
||||
}
|
||||
|
||||
async findAllByRestaurant(restId: string): Promise<Food[]> {
|
||||
return this.foodRepository.find({ restaurant: { id: restId } });
|
||||
async findAllByRestaurant(slug: string): Promise<Food[]> {
|
||||
const restaurant = await this.restRepository.findOne({ slug });
|
||||
if (!restaurant) {
|
||||
throw new NotFoundException(RestMessage.NOT_FOUND);
|
||||
}
|
||||
return this.foodRepository.find({ restaurant: { slug } });
|
||||
}
|
||||
|
||||
findOne(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user