Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

use invoice number as file name

Steven Tey58c505e3c006
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/billing/invoices/[invoiceId]/route.tsx b/apps/web/app/api/workspaces/[idOrSlug]/billing/invoices/[invoiceId]/route.tsx
index 644fa7fbfe..5ede5bfa38 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/billing/invoices/[invoiceId]/route.tsx
+++ b/apps/web/app/api/workspaces/[idOrSlug]/billing/invoices/[invoiceId]/route.tsx
@@ -86,7 +86,7 @@ export const GET = withWorkspace(async ({ workspace, params }) => {
const invoiceMetadata = [
{
label: "Invoice number",
- value: invoice.number,
+ value: `#${invoice.number}`,
},
{
label: "Date",
@@ -335,7 +335,7 @@ export const GET = withWorkspace(async ({ workspace, params }) => {
return new Response(pdf, {
headers: {
"Content-Type": "application/pdf",
- "Content-disposition": "inline",
+ "Content-Disposition": `inline; filename="Invoice-${invoice.number}.pdf"`,
},
});
});