-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: feat: Criação da controller que tem o endpoint get.
- Loading branch information
1 parent
e5857d4
commit dbea464
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/modules/alert/controller/applicationHistory.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |