feat(archive): log PDF report generation in operation logs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user