tipo usuario input output dto
This commit is contained in:
parent
ef9b898a24
commit
e3c9680f6b
9
src/tipo-usuario/dto/output/tipo-usuario.dto.ts
Normal file
9
src/tipo-usuario/dto/output/tipo-usuario.dto.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Expose } from 'class-transformer';
|
||||
|
||||
export class TipoUsuarioOutputDto {
|
||||
@Expose()
|
||||
id_tipo_usuario;
|
||||
|
||||
@Expose()
|
||||
tipo_usuario;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
import { Body, Controller, Get, Post } from '@nestjs/common';
|
||||
import { ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { Serealize } from '../interceptors/serialize.interceptor';
|
||||
import { TipoUsuarioService } from './tipo-usuario.service';
|
||||
import { TipoUsuarioUpdateDto } from './dto/tipo-usuario-update.dto';
|
||||
import { TipoUsuarioUpdateDto } from './dto/input/tipo-usuario-update.dto';
|
||||
import { TipoUsuarioOutputDto } from './dto/output/tipo-usuario.dto';
|
||||
|
||||
@Controller('tipo-usuario')
|
||||
@ApiTags('tipo-usuario')
|
||||
@ -18,6 +20,7 @@ export class TipoUsuarioController {
|
||||
return this.tipoUsuarioService.create(body.tipo_usuario);
|
||||
}
|
||||
|
||||
@Serealize(TipoUsuarioOutputDto)
|
||||
@Get()
|
||||
@ApiOperation({
|
||||
description: 'Endpoint que retorna todos los tipos de usuario.',
|
||||
|
Loading…
Reference in New Issue
Block a user