refactor: remove Puppeteer, delete old PDF download endpoint

This commit is contained in:
2026-07-07 09:56:52 +08:00
parent 6e6dd25dc1
commit d3437311dc
4 changed files with 1 additions and 303 deletions

View File

@@ -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')