feat(archive): log PDF report generation in operation logs

This commit is contained in:
2026-07-06 18:00:46 +08:00
parent bdd2f53b1a
commit 67952af52e

View File

@@ -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);
}
}