Skip to content

Commit

Permalink
fix(bun-2278): cors issue with external pdfurl endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and libruce committed Apr 16, 2024
1 parent 2adc75c commit 00ab73d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/storefront/src/pages/invoice/utils/pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ export const handlePrintPDF = async (
invoiceId: string,
isPayNow = false
): Promise<string> => {
let url = ''
try {
const url = await getInvoiceDownloadPDFUrl(invoiceId, isPayNow)
url = await getInvoiceDownloadPDFUrl(invoiceId, isPayNow)
const pdfUrl = await analyzePDFUrl(url)

return pdfUrl
} catch (error) {
return ''
return url
}
}

Expand Down

0 comments on commit 00ab73d

Please sign in to comment.