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.

add comments

Steven Tey58a74a05b2ca
diff --git a/apps/web/app/api/stripe/integration/webhook/checkout-session-completed.ts b/apps/web/app/api/stripe/integration/webhook/checkout-session-completed.ts
index 273d909d71..ea58dbabf4 100644
--- a/apps/web/app/api/stripe/integration/webhook/checkout-session-completed.ts
+++ b/apps/web/app/api/stripe/integration/webhook/checkout-session-completed.ts
@@ -180,6 +180,7 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
id: link.id,
},
data: {
+ // if the clickEvent variable exists, it means that a new lead was created
...(clickEvent && {
leads: {
increment: 1,
@@ -269,6 +270,7 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
waitUntil(
(async () => {
+ // if the clickEvent variable exists, it means that a new lead was created
if (clickEvent) {
await sendWorkspaceWebhook({
trigger: "lead.created",