This commit is contained in:
Your Name
2025-04-02 11:50:08 -06:00
parent bf7c0e93a8
commit a1f52daa8a
26 changed files with 1109 additions and 42 deletions
+7
View File
@@ -2,32 +2,39 @@ import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/commo
import { SeccionService } from './seccion.service';
import { CreateSeccionDto } from './dto/create-seccion.dto';
import { UpdateSeccionDto } from './dto/update-seccion.dto';
import { SeccionApiDocumentation } from './seccion.documentation';
@Controller('seccion')
@SeccionApiDocumentation.ApiController
export class SeccionController {
constructor(private readonly seccionService: SeccionService) {}
@Post()
@SeccionApiDocumentation.ApiCreate
create(@Body() createSeccionDto: CreateSeccionDto) {
return this.seccionService.create(createSeccionDto);
}
@Get()
@SeccionApiDocumentation.ApiGetAll
findAll() {
return this.seccionService.findAll();
}
@Get(':id')
@SeccionApiDocumentation.ApiGetOne
findOne(@Param('id') id: string) {
return this.seccionService.findOne(+id);
}
@Patch(':id')
@SeccionApiDocumentation.ApiUpdate
update(@Param('id') id: string, @Body() updateSeccionDto: UpdateSeccionDto) {
return this.seccionService.update(+id, updateSeccionDto);
}
@Delete(':id')
@SeccionApiDocumentation.ApiRemove
remove(@Param('id') id: string) {
return this.seccionService.remove(+id);
}