@@ -6,19 +6,19 @@ import {
66 Body ,
77 Query ,
88 UseGuards ,
9- ValidationPipe
9+ ValidationPipe ,
1010} from '@nestjs/common' ;
1111import {
1212 ApiTags ,
1313 ApiOperation ,
1414 ApiResponse ,
1515 ApiBearerAuth ,
1616 ApiParam ,
17- ApiQuery
17+ ApiQuery ,
1818} from '@nestjs/swagger' ;
1919import { JwtAuthGuard } from '../auth/jwt-auth.guard' ;
2020import { ReportsService } from './reports.service' ;
21- import { Report , ReportStatus } from './models/report.model' ;
21+ import { Report } from './models/report.model' ;
2222import { GetReportsQueryDto } from './dto/get-reports.dto' ;
2323import { UpdateReportStatusDto } from './dto/update-report-status.dto' ;
2424
@@ -33,7 +33,7 @@ export class ReportsController {
3333 @ApiResponse ( {
3434 status : 200 ,
3535 description : 'Returns all reports' ,
36- type : [ Report ]
36+ type : [ Report ] ,
3737 } )
3838 @Get ( )
3939 async findAll ( ) : Promise < Report [ ] > {
@@ -44,12 +44,12 @@ export class ReportsController {
4444 @ApiResponse ( {
4545 status : 200 ,
4646 description : 'Returns the latest reports' ,
47- type : [ Report ]
47+ type : [ Report ] ,
4848 } )
4949 @ApiQuery ( {
5050 name : 'limit' ,
5151 required : false ,
52- description : 'Maximum number of reports to return'
52+ description : 'Maximum number of reports to return' ,
5353 } )
5454 @Get ( 'latest' )
5555 async findLatest ( @Query ( ValidationPipe ) queryDto : GetReportsQueryDto ) : Promise < Report [ ] > {
@@ -60,20 +60,20 @@ export class ReportsController {
6060 @ApiResponse ( {
6161 status : 200 ,
6262 description : 'Report status updated successfully' ,
63- type : Report
63+ type : Report ,
6464 } )
6565 @ApiResponse ( {
6666 status : 404 ,
67- description : 'Report not found'
67+ description : 'Report not found' ,
6868 } )
6969 @ApiParam ( {
7070 name : 'id' ,
71- description : 'Report ID'
71+ description : 'Report ID' ,
7272 } )
7373 @Patch ( ':id/status' )
7474 async updateStatus (
7575 @Param ( 'id' ) id : string ,
76- @Body ( ValidationPipe ) updateDto : UpdateReportStatusDto
76+ @Body ( ValidationPipe ) updateDto : UpdateReportStatusDto ,
7777 ) : Promise < Report > {
7878 return this . reportsService . updateStatus ( id , updateDto ) ;
7979 }
0 commit comments