2022-04-20 18:02:12 -05:00
|
|
|
import { Controller, Get, Query } from '@nestjs/common';
|
2022-04-04 20:53:32 -05:00
|
|
|
import { CarreraService } from './carrera.service';
|
2022-04-22 13:36:18 -05:00
|
|
|
import { CarritoGetDto } from './dto/carrera-get-dto';
|
2022-04-30 21:18:19 -05:00
|
|
|
import {ApiTags} from '@nestjs/swagger'
|
2022-03-31 14:33:11 -06:00
|
|
|
|
|
|
|
|
@Controller('carrera')
|
2022-04-30 21:18:19 -05:00
|
|
|
@ApiTags('carrera')
|
2022-04-04 20:53:32 -05:00
|
|
|
export class CarreraController {
|
|
|
|
|
constructor(private carreraService: CarreraService) {}
|
2022-04-17 20:47:35 -05:00
|
|
|
|
2022-04-22 13:36:18 -05:00
|
|
|
@Get('carreras')
|
2022-04-20 18:02:12 -05:00
|
|
|
carreras(@Query() query: CarritoGetDto) {
|
2022-04-24 18:38:31 -05:00
|
|
|
return this.carreraService.findAllByIdInstitucion(Number(query.id_institucion));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get('carrera')
|
|
|
|
|
carrera(@Query() query: CarritoGetDto) {
|
2022-04-22 13:36:18 -05:00
|
|
|
return this.carreraService.findById(Number(query.id_carrera));
|
2022-04-20 18:02:12 -05:00
|
|
|
}
|
2022-04-04 20:53:32 -05:00
|
|
|
}
|