mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-24 16:49:48 +00:00
wip
This commit is contained in:
@@ -168,7 +168,7 @@ export class SaleReceiptsController {
|
||||
@Headers('accept') acceptHeader: string,
|
||||
@Res({ passthrough: true }) res: Response,
|
||||
) {
|
||||
if (acceptHeader.includes(AcceptType.ApplicationPdf)) {
|
||||
if (acceptHeader?.includes(AcceptType.ApplicationPdf)) {
|
||||
const [pdfContent] =
|
||||
await this.saleReceiptApplication.getSaleReceiptPdf(id);
|
||||
|
||||
@@ -177,7 +177,7 @@ export class SaleReceiptsController {
|
||||
'Content-Length': pdfContent.length,
|
||||
});
|
||||
res.send(pdfContent);
|
||||
} else if (acceptHeader.includes(AcceptType.ApplicationTextHtml)) {
|
||||
} else if (acceptHeader?.includes(AcceptType.ApplicationTextHtml)) {
|
||||
const htmlContent =
|
||||
await this.saleReceiptApplication.getSaleReceiptHtml(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user