2022-06-23 23:07:12 -05:00
|
|
|
import { Controller, Get, UseGuards } from '@nestjs/common';
|
|
|
|
|
import { AuthGuard } from '@nestjs/passport';
|
2022-05-30 15:26:54 -05:00
|
|
|
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
2022-06-14 00:14:20 -05:00
|
|
|
import { Serealize } from '../interceptors/serialize.interceptor';
|
2022-05-30 15:27:43 -05:00
|
|
|
import { StatusService } from './status.service';
|
2022-06-14 00:14:20 -05:00
|
|
|
import { StatusOutputDto } from './dto/output/status.dto';
|
2022-03-29 22:03:19 -06:00
|
|
|
|
|
|
|
|
@Controller('status')
|
2022-04-30 21:18:19 -05:00
|
|
|
@ApiTags('status')
|
2022-04-04 20:53:32 -05:00
|
|
|
export class StatusController {
|
|
|
|
|
constructor(private statusService: StatusService) {}
|
2022-04-17 23:08:26 -05:00
|
|
|
|
2022-06-14 00:14:20 -05:00
|
|
|
@Serealize(StatusOutputDto)
|
2022-04-17 23:08:26 -05:00
|
|
|
@Get()
|
2022-06-23 23:07:12 -05:00
|
|
|
// @UseGuards(AuthGuard('jwt'))
|
2022-05-30 15:26:54 -05:00
|
|
|
@ApiOperation({ description: 'Endpoint que retorna todos los status.' })
|
2022-04-19 23:52:04 -05:00
|
|
|
get() {
|
|
|
|
|
return this.statusService.findAll();
|
|
|
|
|
}
|
2022-04-04 20:53:32 -05:00
|
|
|
}
|