find all rest

This commit is contained in:
2026-06-21 16:34:23 +03:30
parent d6e3f78e41
commit 449cd89287
16 changed files with 75 additions and 93019 deletions
@@ -9,11 +9,13 @@ import {
ApiBearerAuth,
ApiBody,
ApiNotFoundResponse,
ApiOkResponse,
ApiOperation,
ApiParam,
ApiTags,
ApiHeader,
} from '@nestjs/swagger';
import { ActiveRestaurantListItemDto } from '../dto/active-restaurant-list-item.dto';
import { RestId } from 'src/common/decorators';
import { API_HEADER_SLUG } from 'src/common/constants';
import { SuperAdminAuthGuard } from 'src/modules/auth/guards/superAdminAuth.guard';
@@ -28,6 +30,14 @@ import { UpdateRestaurantBgDto } from '../dto/update-restaurant-bg.dto';
export class RestaurantsController {
constructor(private readonly restaurantsService: RestaurantsService) { }
@Get('public/restaurants')
@CacheResponse({ keyPrefix: CacheKeyPrefixes.RESTAURANT_SPEC, params: [] })
@ApiOperation({ summary: 'Get all active restaurants (summary fields)' })
@ApiOkResponse({ description: 'List of active restaurants', type: [ActiveRestaurantListItemDto] })
findAllActiveRestaurants() {
return this.restaurantsService.findAllActiveRestaurants();
}
@Get('public/restaurants/:slug')
@CacheResponse({ keyPrefix: CacheKeyPrefixes.RESTAURANT_SPEC, params: ['slug'] })
@ApiOperation({ summary: 'Get restaurant specification by slug' })