fix bug in favorite list

This commit is contained in:
2025-12-29 11:24:10 +03:30
parent 89af06d15b
commit e8787be08e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -260,8 +260,8 @@ export class FoodService {
}
async getMyFavorites(userId: string) {
return this.em.find(Favorite, { user: userId }, { populate: ['food'] });
async getMyFavorites(userId: string,restId: string) {
return this.em.find(Favorite, { user: userId, food: { restaurant: { id: restId } } }, { populate: ['food'] });
}
/**
* Invalidate cache for restaurant foods