import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'; 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); } }