diff --git a/src/modules/restaurants/providers/restaurants.service.ts b/src/modules/restaurants/providers/restaurants.service.ts index 6214866..66c838d 100644 --- a/src/modules/restaurants/providers/restaurants.service.ts +++ b/src/modules/restaurants/providers/restaurants.service.ts @@ -2,7 +2,7 @@ import { BadRequestException, Injectable, NotFoundException } from '@nestjs/comm import { CreateRestaurantDto } from '../dto/create-restaurant.dto'; import { UpdateRestaurantDto } from '../dto/update-restaurant.dto'; import { UpgradeSubscriptionDto } from '../dto/upgrade-subscription.dto'; - import { Restaurant } from '../entities/restaurant.entity'; +import { Restaurant } from '../entities/restaurant.entity'; import { EntityManager } from '@mikro-orm/postgresql'; import { RestRepository } from '../repositories/rest.repository'; import { RestMessage } from 'src/common/enums/message.enum'; @@ -136,7 +136,8 @@ export class RestaurantsService { } async update(id: string, dto: UpdateRestaurantDto): Promise { - const restaurant = await this.restRepository.findOne({ id }); + + const restaurant = await this.restRepository.findOne({ id: id }); if (!restaurant) { throw new NotFoundException(RestMessage.NOT_FOUND);