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.

Update invoice-paid.ts

Kiran K069f9b98fc44
diff --git a/apps/web/app/api/stripe/integration/webhook/invoice-paid.ts b/apps/web/app/api/stripe/integration/webhook/invoice-paid.ts
index 3a16603465..4031fa642e 100644
--- a/apps/web/app/api/stripe/integration/webhook/invoice-paid.ts
+++ b/apps/web/app/api/stripe/integration/webhook/invoice-paid.ts
@@ -75,7 +75,7 @@ export async function invoicePaid(event: Stripe.Event) {
return `Link with ID ${linkId} not found, skipping...`;
}
- const [_sale, _link, workspace] = await Promise.all([
+ const [_sale, linkUpdated, workspace] = await Promise.all([
recordSale(saleData),
// update link sales count
@@ -173,7 +173,7 @@ export async function invoicePaid(event: Stripe.Event) {
workspace,
data: transformSaleEventData({
...saleData,
- link,
+ link: linkUpdated,
customerId: customer.id,
customerExternalId: customer.externalId,
customerName: customer.name,