status output dto
This commit is contained in:
parent
228af0dff5
commit
e21fb2f6b1
9
src/status/dto/output/status.dto.ts
Normal file
9
src/status/dto/output/status.dto.ts
Normal file
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user