use global context

This commit is contained in:
2026-06-04 16:58:01 +03:30
parent 70711de81c
commit 0d619f313d
17 changed files with 46 additions and 10 deletions
@@ -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;