get restaurant by subscription id
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user