find all rest
This commit is contained in:
@@ -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' })
|
||||
|
||||
Reference in New Issue
Block a user