This commit is contained in:
2026-04-07 15:30:09 +03:30
parent c573e9d1c0
commit 055ba55586
5 changed files with 18 additions and 36 deletions
@@ -42,7 +42,7 @@ export class RestaurantsController {
@ApiOperation({ summary: 'Get restaurant by ID from request' })
@Get('admin/restaurants/my-restaurant')
async findOne(@RestId() restId: string) {
return await this.restaurantsService.findOne(restId);
return await this.restaurantsService.findOneOrFail(restId);
}
@UseGuards(AdminAuthGuard)
@@ -96,7 +96,7 @@ export class RestaurantsController {
@ApiParam({ name: 'id', required: true, description: 'Restaurant ID' })
@Get('super-admin/restaurants/:id')
findOneById(@Param('id') id: string) {
return this.restaurantsService.findOne(id);
return this.restaurantsService.findOneOrFail(id);
}
@UseGuards(SuperAdminAuthGuard)