Commit 4c8cf63d authored by nanahira's avatar nanahira

fix

parent 9486cafa
Pipeline #41201 failed with stages
in 26 seconds
......@@ -9,6 +9,7 @@ import {
ApiBody,
ApiConsumes,
ApiOkResponse,
ApiOperation,
ApiProduces,
} from '@nestjs/swagger';
import { FileInterceptor } from '@nestjs/platform-express';
......@@ -22,6 +23,9 @@ export class AppController {
constructor(private readonly appService: AppService) {}
@Post('fill')
@ApiOperation({
summary: '生成卡组登记表 PDF',
})
@ApiProduces('application/pdf')
@UseInterceptors(FileInterceptor('file'))
@ApiConsumes('multipart/form-data')
......
......@@ -147,7 +147,7 @@ export class AppService extends ConsoleLogger {
return new StreamableFile(Buffer.from(await doc.save()), {
type: 'application/pdf',
disposition: `attachment; filename="deck_${dto.name || Date.now()}.pdf"`,
disposition: `attachment; filename="deck_${Date.now()}.pdf"`,
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment