diff --git a/backend/src/town/town.controller.ts b/backend/src/town/town.controller.ts index dacf583d9f6f41a5f896a8fba7af1da12a06a687..a21509d36dd6b5eda9327cafee16fb2528c0ea0a 100644 --- a/backend/src/town/town.controller.ts +++ b/backend/src/town/town.controller.ts @@ -1,11 +1,11 @@ import { Controller, Get, Post, Param, Delete, UseInterceptors, UploadedFile, Body, Query } from '@nestjs/common'; import { TownService } from './town.service'; -import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiParam, ApiQuery, ApiTags } from '@nestjs/swagger'; import { FileValidationPipe } from 'src/shared/pipe/file-validation.pipe'; import { fileInterceptor } from 'src/shared/interceptors/file-save.interceptor'; import { CreateTownDto } from './dto/create-town.dto'; @Controller() -@ApiTags('Agregar un pueblo') +@ApiTags('Pueblos') export class TownController { constructor( private readonly townService: TownService, @@ -25,7 +25,8 @@ export class TownController { throw error; } } - + @ApiParam({ name: 'stateId', type: Number }) + @ApiQuery({ name: 'lang', type: String }) @Get('state/:stateId/town') async findTownsByState(@Param('stateId') stateId: number, @Query('lang') lang) { try {