get restaurant by subscription id

This commit is contained in:
2025-12-25 11:24:02 +03:30
parent b18f9b0222
commit b78eeb14ac
2 changed files with 17 additions and 0 deletions
@@ -64,6 +64,14 @@ export class RestaurantsService {
return restaurant;
}
async findOneBySubscriptionId(subscriptionId: string): Promise<Restaurant> {
const restaurant = await this.restRepository.findOne({ subscriptionId });
if (!restaurant) {
throw new NotFoundException(RestMessage.NOT_FOUND);
}
return restaurant;
}
async getRestaurantSpecification(slug: string) {
const restaurant = await this.findBySlug(slug);
return restaurant;