forked from wangziqi/gongxue-base
refactor: remove Puppeteer, delete old PDF download endpoint
This commit is contained in:
@@ -8,12 +8,11 @@ import {
|
||||
Param,
|
||||
UseGuards,
|
||||
Request,
|
||||
Res,
|
||||
UseInterceptors,
|
||||
UploadedFile,
|
||||
} from '@nestjs/common';
|
||||
import { FileInterceptor } from '@nestjs/platform-express';
|
||||
import type { Request as ExpressRequest, Response } from 'express';
|
||||
import type { Request as ExpressRequest } from 'express';
|
||||
import { ArchiveReportService } from './archive-report.service';
|
||||
import { ArchiveService } from './archive.service';
|
||||
import {
|
||||
@@ -340,26 +339,6 @@ export class ArchiveController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Get(':studentId/report')
|
||||
@RequirePermission('student:view')
|
||||
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);
|
||||
}
|
||||
|
||||
@Get(':studentId/report-html')
|
||||
@RequirePermission('student:view')
|
||||
|
||||
Reference in New Issue
Block a user