use global context
This commit is contained in:
@@ -139,10 +139,8 @@ export class RestaurantsService {
|
||||
}
|
||||
|
||||
async findOneBySubscriptionId(subscriptionId: string): Promise<Restaurant> {
|
||||
console.log('subscriptionId', subscriptionId)
|
||||
const restaurant = await this.restRepository.findOne({ subscriptionId });
|
||||
console.log('restaurant', restaurant)
|
||||
if (!restaurant) {
|
||||
const restaurant = await this.restRepository.findOne({ subscriptionId });
|
||||
if (!restaurant) {
|
||||
throw new NotFoundException(RestMessage.NOT_FOUND);
|
||||
}
|
||||
return restaurant;
|
||||
|
||||
Reference in New Issue
Block a user