This commit is contained in:
Andres2908
2022-04-24 18:38:31 -05:00
parent 46ad558633
commit 0bf224d1d2
3 changed files with 16 additions and 9 deletions
+5 -6
View File
@@ -6,14 +6,13 @@ import { CarritoGetDto } from './dto/carrera-get-dto';
export class CarreraController {
constructor(private carreraService: CarreraService) {}
@Get()
get() {
// recibir id_institucion y traer todoas las carreras de esa institiucion
return this.carreraService.findAll();
}
@Get('carreras')
carreras(@Query() query: CarritoGetDto) {
return this.carreraService.findAllByIdInstitucion(Number(query.id_institucion));
}
@Get('carrera')
carrera(@Query() query: CarritoGetDto) {
return this.carreraService.findById(Number(query.id_carrera));
}
}