add inventory
This commit is contained in:
@@ -88,7 +88,7 @@ export class FoodService {
|
|||||||
* Public food detail (only active foods are visible).
|
* Public food detail (only active foods are visible).
|
||||||
*/
|
*/
|
||||||
async findPublicById(foodId: string, userId?: string): Promise<any> {
|
async findPublicById(foodId: string, userId?: string): Promise<any> {
|
||||||
const food = await this.foodRepository.findOne({ id: foodId, isActive: true }, { populate: ['category'] });
|
const food = await this.foodRepository.findOne({ id: foodId, isActive: true }, { populate: ['category', 'inventory'] });
|
||||||
if (!food) throw new NotFoundException(FoodMessage.NOT_FOUND);
|
if (!food) throw new NotFoundException(FoodMessage.NOT_FOUND);
|
||||||
let isFavorite = false;
|
let isFavorite = false;
|
||||||
if (userId) {
|
if (userId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user