mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: Download invoice pdf of the payment link page
This commit is contained in:
@@ -200,7 +200,10 @@ export const useGeneratePaymentLinkInvoicePdf = (
|
||||
>(
|
||||
(values: GeneratePaymentLinkInvoicePdfValues) => {
|
||||
return apiRequest
|
||||
.get(`/payment-links/${values.paymentLinkId}/invoice/pdf`)
|
||||
.get(`/payment-links/${values.paymentLinkId}/invoice/pdf`, {
|
||||
responseType: 'blob',
|
||||
headers: { accept: 'application/pdf' },
|
||||
})
|
||||
.then((res) => res?.data);
|
||||
},
|
||||
{ ...options },
|
||||
@@ -217,7 +220,10 @@ export const useGetPaymentLinkInvoicePdf = (
|
||||
[GetPaymentLinkInvoicePdf, invoiceId],
|
||||
() =>
|
||||
apiRequest
|
||||
.get(`/payment-links/${invoiceId}/invoice/pdf`)
|
||||
.get(`/payment-links/${invoiceId}/invoice/pdf`, {
|
||||
responseType: 'blob',
|
||||
headers: { accept: 'application/pdf' },
|
||||
})
|
||||
.then((res) => res.data),
|
||||
{
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user