swagger
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
||||
import { CurrentUser } from '../auth/decorators/current-user.decorator';
|
||||
import { Public } from '../auth/decorators/public.decorator';
|
||||
import { Permissions } from '../auth/decorators/permissions.decorator';
|
||||
@@ -23,7 +24,11 @@ import { CreateServiceSuggestionDto } from './dto/create-service-suggestion.dto'
|
||||
import { FindSuggestionsQueryDto } from './dto/find-suggestions-query.dto';
|
||||
import { UpdateServiceSuggestionDto } from './dto/update-service-suggestion.dto';
|
||||
import { SuggestionsService } from './suggestions.service';
|
||||
import { ApiPublicEndpoint } from '../swagger/decorators/swagger-auth.decorator';
|
||||
import { SWAGGER_JWT_AUTH } from '../swagger/swagger.setup';
|
||||
|
||||
@ApiTags('Suggestions')
|
||||
@ApiBearerAuth(SWAGGER_JWT_AUTH)
|
||||
@Controller('suggestions')
|
||||
@UseGuards(RolesGuard, PermissionsGuard)
|
||||
export class SuggestionsController {
|
||||
@@ -47,6 +52,7 @@ export class SuggestionsController {
|
||||
}
|
||||
|
||||
@Public()
|
||||
@ApiPublicEndpoint('Get suggestions for a service')
|
||||
@Get('for-service/:serviceId')
|
||||
findForService(@Param('serviceId', ParseUUIDPipe) serviceId: string) {
|
||||
return this.suggestionsService.findForService(serviceId);
|
||||
|
||||
Reference in New Issue
Block a user