diff --git a/src/carrera-programa/carrera-programa.controller.ts b/src/carrera-programa/carrera-programa.controller.ts index 289b5ec..374c70f 100644 --- a/src/carrera-programa/carrera-programa.controller.ts +++ b/src/carrera-programa/carrera-programa.controller.ts @@ -2,7 +2,7 @@ import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common'; import { CarreraProgramaService } from './carrera-programa.service'; import { CarreraProgramaCreateDto } from './dto/carrera-programa-create.dto'; import { CarreraProgramaUpdateDto } from './dto/carrera-programa-update.dto'; -import {ApiTags} from '@nestjs/swagger' +import {ApiOperation, ApiTags} from '@nestjs/swagger' @Controller('carrera-programa') @ApiTags('carrera-programa') @@ -10,6 +10,9 @@ export class CarreraProgramaController { constructor(private carreraProgramaService: CarreraProgramaService) {} @Post() + @ApiOperation({ + description: 'Creamos una carrera programa, pasandole los parametros id_carrera y id_programa' + }) create(@Body() body: CarreraProgramaCreateDto) { return this.carreraProgramaService.create( body.id_carrera, @@ -18,11 +21,17 @@ export class CarreraProgramaController { } @Delete(':id') + @ApiOperation({ + description: 'Borramos una carrera programa a partir del id (id_carrera_programa)' + }) delete(@Param('id') id_carrera_programa: number) { return this.carreraProgramaService.delete(id_carrera_programa) } @Get() + @ApiOperation({ + description: 'Nos trae todas las carrera-programa' + }) get() { return this.carreraProgramaService.findAll(); }