mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
Enhance weekly summary functionality to accept optional date range parameters in CardService, TransactionService, JuniorService, and JuniorController. Update API documentation to reflect new query parameters for start and end dates.
This commit is contained in:
@ -212,7 +212,7 @@ export class JuniorService {
|
||||
this.logger.log(`Junior ${juniorId} deleted successfully`);
|
||||
}
|
||||
|
||||
async getWeeklySummary(juniorId: string, guardianId: string) {
|
||||
async getWeeklySummary(juniorId: string, guardianId: string, startDate?: Date, endDate?: Date) {
|
||||
const doesBelong = await this.doesJuniorBelongToGuardian(guardianId, juniorId);
|
||||
|
||||
if (!doesBelong) {
|
||||
@ -221,7 +221,7 @@ export class JuniorService {
|
||||
}
|
||||
|
||||
this.logger.log(`Getting weekly summary for junior ${juniorId}`);
|
||||
return this.cardService.getWeeklySummary(juniorId);
|
||||
return this.cardService.getWeeklySummary(juniorId, startDate, endDate);
|
||||
}
|
||||
|
||||
async getJuniorHome(juniorId: string, userId: string, size: number): Promise<JuniorHomeResponseDto> {
|
||||
|
||||
Reference in New Issue
Block a user