From df3e02ffef7a56c07d496c1b322457e597034417 Mon Sep 17 00:00:00 2001 From: hxtree Date: Mon, 23 Oct 2023 04:36:23 +0000 Subject: [PATCH] fix: remove dead code Signed-off-by: hxtree --- .../html-to-pdf/src/module/pdf/pdf.controller.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/services/html-to-pdf/src/module/pdf/pdf.controller.ts b/services/html-to-pdf/src/module/pdf/pdf.controller.ts index 2b9082a0..5fd7a964 100644 --- a/services/html-to-pdf/src/module/pdf/pdf.controller.ts +++ b/services/html-to-pdf/src/module/pdf/pdf.controller.ts @@ -99,19 +99,14 @@ export class PdfController { res.setHeader('Content-Length', Buffer.byteLength(buffer, 'utf-8')); res.setHeader('Content-Type', 'application/pdf'); res.setHeader('Content-Disposition', `attachment; filename=${filename}`); - // stream.pipe(res); return new StreamableFile(stream); } /** - * base64 can be responses can be checked using the following - * https://base64.guru/converter/decode/pdf - */ + * base64 can be responses can be checked using the following + * https://base64.guru/converter/decode/pdf + */ res.setHeader('Content-Type', 'application/json;charset=UTF-8'); - // res.status(200).send({ - // content: buffer.toString('base64'), - // filename, - // mimeType: 'application/pdf', - // }); + return { content: buffer.toString('base64'), filename,