mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 00:54:54 +00:00
feat: weekly stats for junior
This commit is contained in:
@ -144,4 +144,16 @@ export class JuniorController {
|
||||
|
||||
return ResponseFactory.data(new TransferToJuniorResponseDto(newAmount));
|
||||
}
|
||||
|
||||
@Get(':juniorId/weekly-summary')
|
||||
@UseGuards(RolesGuard)
|
||||
@AllowedRoles(Roles.GUARDIAN)
|
||||
@ApiDataResponse('string')
|
||||
async getWeeklySummary(
|
||||
@Param('juniorId', CustomParseUUIDPipe) juniorId: string,
|
||||
@AuthenticatedUser() user: IJwtPayload,
|
||||
) {
|
||||
const summary = await this.juniorService.getWeeklySummary(juniorId, user.sub);
|
||||
return ResponseFactory.data(summary);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user