diff --git a/apps/server/src/archive/archive.controller.ts b/apps/server/src/archive/archive.controller.ts index e1d7079..68f198e 100644 --- a/apps/server/src/archive/archive.controller.ts +++ b/apps/server/src/archive/archive.controller.ts @@ -345,7 +345,19 @@ export class ArchiveController { async generateReport( @Param('studentId') studentId: string, @Res() res: Response, + @Request() req: AuthenticatedRequest, ) { + const { ipAddress, userAgent } = extractRequestInfo(req); + await this.logService.log({ + userId: req.user?.id, + username: req.user?.username, + module: 'archive', + action: 'generate_report', + targetId: +studentId, + targetType: 'student', + ipAddress, + userAgent, + }); return this.reportService.generateReport(+studentId, res); } }