Files
pcpuma_unam_api/src/hora-excepcion/hora-excepcion.controller.ts
T
2022-05-30 16:02:01 -05:00

31 lines
954 B
TypeScript

import { Body, Controller, Delete, Get, Post, Param } from '@nestjs/common';
import { HoraExcepcionService } from './hora-excepcion.service';
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
@Controller('hora-excepcion')
// @ApiTags('hora-excepcion')
export class HoraExcepcionController {
constructor(private horaExcepcionService: HoraExcepcionService) {}
@Post()
// @ApiOperation({
// description: 'Creamos una institucion-dia con el id_institucion_dia',
// })
create(@Body() body: HoraExcepcionDto) {
return this.horaExcepcionService.create(body.id_institucion_dia);
}
@Delete(':id')
// @ApiOperation({
// description:
// 'Con este delete borramos una hora_excepcion con ayuda de su id',
// })
delete(@Param('id') id_hora_excepcion: number) {
return this.horaExcepcionService.delete(id_hora_excepcion);
}
@Get()
get() {}
}