This commit is contained in:
2022-04-22 13:36:18 -05:00
parent a164859043
commit e04091d74f
16 changed files with 179 additions and 131 deletions
@@ -1,7 +1,7 @@
import { Body, Controller, Delete, Get, Post, Put } 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 { CarreraProgramaCreateDto } from './dto/carrera-programa-create.dto';
import { CarreraProgramaUpdateDto } from './dto/carrera-programa-update.dto';
@Controller('carrera-programa')
export class CarreraProgramaController {
@@ -9,7 +9,10 @@ export class CarreraProgramaController {
@Post()
create(@Body() body: CarreraProgramaCreateDto) {
return this.carreraProgramaService.create(body.id_carrera, body.id_programa)
return this.carreraProgramaService.create(
body.id_carrera,
body.id_programa,
);
}
@Delete()
@@ -17,11 +20,11 @@ export class CarreraProgramaController {
@Get()
get() {
return this.carreraProgramaService.findAll()
return this.carreraProgramaService.findAll();
}
@Put()
update(@Body() body: CarreraProgramaUpdateDto) {
return this.carreraProgramaService.update(body)
return this.carreraProgramaService.update(body);
}
}