The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update naming
Steven Tey20e43b449990
diff --git a/apps/web/app/api/track/lead/route.ts b/apps/web/app/api/track/lead/route.tsindex 8c03a7c04b..2c76798fdc 100644--- a/apps/web/app/api/track/lead/route.ts+++ b/apps/web/app/api/track/lead/route.ts@@ -85,8 +85,9 @@ export const POST = withWorkspace(const leadEventId = nanoid(16);// Handle customer creation and lead recording based on mode- if (mode === "sync") {+ if (mode === "wait") {// Execute customer creation synchronously+ // TODO: Find a way to reuse this code with the one in async modecustomer = await prisma.customer.upsert({where: {projectId_externalId: {diff --git a/apps/web/lib/zod/schemas/leads.ts b/apps/web/lib/zod/schemas/leads.tsindex b4e96102fc..71fe681731 100644--- a/apps/web/lib/zod/schemas/leads.ts+++ b/apps/web/lib/zod/schemas/leads.ts@@ -67,10 +67,10 @@ export const trackLeadRequestSchema = z.object({.default(null).describe("Additional metadata to be stored with the lead event"),mode: z- .enum(["sync", "async"])+ .enum(["async", "wait"]).default("async").describe(- "The mode to use for tracking the lead event. `sync` will block the request until the lead event is fully recorded in Dub; `async` will not block the request.",+ "The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub.",),});