Skip to content

Commit

Permalink
✨ feat: feat: Criação da controller que tem o endpoint get.
Browse files Browse the repository at this point in the history
  • Loading branch information
leticiazalasik committed Nov 9, 2024
1 parent e5857d4 commit dbea464
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/modules/alert/controller/applicationHistory.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Controller, Get, Param, Query } from '@nestjs/common';
import { ApplicationHistoryService } from '../service/applicationHistory.service';
@Controller('users')
export class ApplicationHistoryController {
constructor(private readonly applicationHistoryService: ApplicationHistoryService) { }
@Get(':userId/applications/history')
async getApplicationHistory(
@Param('userId') userId: string,
@Query('status') status?: string,
@Query('page') page: number = 1,
@Query('limit') limit: number = 10,
): Promise<any[]> {
return this.applicationHistoryService.getApplicationHistory(userId, status, page, limit);
}
}

0 comments on commit dbea464

Please sign in to comment.