status output dto
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { Expose } from 'class-transformer';
|
||||
|
||||
export class StatusOutputDto {
|
||||
@Expose()
|
||||
id_status;
|
||||
|
||||
@Expose()
|
||||
status;
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { Serealize } from '../interceptors/serialize.interceptor';
|
||||
import { StatusService } from './status.service';
|
||||
import { StatusOutputDto } from './dto/output/status.dto';
|
||||
|
||||
@Controller('status')
|
||||
@ApiTags('status')
|
||||
export class StatusController {
|
||||
constructor(private statusService: StatusService) {}
|
||||
|
||||
@Serealize(StatusOutputDto)
|
||||
@Get()
|
||||
@ApiOperation({ description: 'Endpoint que retorna todos los status.' })
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user