This commit is contained in:
2025-11-25 16:11:00 +03:30
parent e6fb28b87e
commit c2bd8b94e5
5 changed files with 126 additions and 123 deletions
@@ -36,10 +36,12 @@ export class RestaurantsController {
create(@Body() createRestaurantDto: CreateRestaurantDto) {
return this.restaurantsService.create(createRestaurantDto);
}
@Get('admin/restaurants')
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@ApiOperation({ summary: 'Get all restaurants' })
@ApiResponse({ status: 200, description: 'Restaurants found' })
@Get()
findAll() {
return this.restaurantsService.findAll();
}
@@ -50,7 +52,7 @@ export class RestaurantsController {
@ApiOperation({ summary: 'Get restaurant by ID from request' })
@ApiResponse({ status: 200, description: 'Restaurant found' })
@ApiNotFoundResponse({ description: 'Restaurant not found' })
@Get('my-restaurant')
@Get('admin/restaurants/my-restaurant')
async findOne(@RestId() restId: string) {
return await this.restaurantsService.findOne(restId);
}