ApiOperation hora-exception
This commit is contained in:
parent
f5ca574f44
commit
41f9dbb0e6
@ -1,7 +1,7 @@
|
|||||||
import { Body, Controller, Delete, Get, Post, Put, Param } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Post, Put, Param } from '@nestjs/common';
|
||||||
import { HoraExcepcionService } from './hora-excepcion.service';
|
import { HoraExcepcionService } from './hora-excepcion.service';
|
||||||
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto'
|
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto'
|
||||||
import {ApiTags} from '@nestjs/swagger'
|
import { ApiOperation, ApiTags} from '@nestjs/swagger'
|
||||||
|
|
||||||
@Controller('hora-excepcion')
|
@Controller('hora-excepcion')
|
||||||
@ApiTags('hora-excepcion')
|
@ApiTags('hora-excepcion')
|
||||||
@ -9,11 +9,17 @@ export class HoraExcepcionController {
|
|||||||
constructor(private horaExcepcionService: HoraExcepcionService) {}
|
constructor(private horaExcepcionService: HoraExcepcionService) {}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
|
@ApiOperation({
|
||||||
|
description: 'Creamos una institucion-dia con el id_institucion_dia'
|
||||||
|
})
|
||||||
create(@Body() body: HoraExcepcionDto) {
|
create(@Body() body: HoraExcepcionDto) {
|
||||||
return this.horaExcepcionService.create(body.id_institucion_dia)
|
return this.horaExcepcionService.create(body.id_institucion_dia)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete(':id')
|
@Delete(':id')
|
||||||
|
@ApiOperation({
|
||||||
|
description: 'Con este delete borramos una hora_excepcion con ayuda de su id'
|
||||||
|
})
|
||||||
delete(@Param('id') id_hora_excepcion: number) {
|
delete(@Param('id') id_hora_excepcion: number) {
|
||||||
return this.horaExcepcionService.delete(id_hora_excepcion)
|
return this.horaExcepcionService.delete(id_hora_excepcion)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user