The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
use Promise.all
Kiran K7caa60beaeee
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/route.ts b/apps/web/app/api/campaigns/webhooks/stripe/route.tsindex 6286ea823b..7c6da3057e 100644--- a/apps/web/app/api/campaigns/webhooks/stripe/route.ts+++ b/apps/web/app/api/campaigns/webhooks/stripe/route.ts@@ -185,20 +185,22 @@ async function customerCreated(event: Stripe.Event) {},});- // Record customer in TB- await recordCustomer({- workspace_id: customer.projectId,- customer_id: customer.id,- name: customer.name || "",- email: customer.email || "",- avatar: customer.avatar || "",- });+ await Promise.all([+ // Record customer in TB+ recordCustomer({+ workspace_id: customer.projectId,+ customer_id: customer.id,+ name: customer.name || "",+ email: customer.email || "",+ avatar: customer.avatar || "",+ }),- // Record lead- recordLead({- ...clickData,- event_id: nanoid(16),- event_name: "Customer created",- customer_id: customer.id,- });+ // Record lead+ recordLead({+ ...clickData,+ event_id: nanoid(16),+ event_name: "Customer created",+ customer_id: customer.id,+ }),+ ]);}