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 route.ts

Steven Tey4ef7f2feb007
diff --git a/apps/web/app/api/track/lead/route.ts b/apps/web/app/api/track/lead/route.ts
index 5e3ab4f96b..f17bb40d5f 100644
--- a/apps/web/app/api/track/lead/route.ts
+++ b/apps/web/app/api/track/lead/route.ts
@@ -145,7 +145,15 @@ export const POST = withWorkspaceEdge(
}),
);
- return NextResponse.json(lead);
+ return NextResponse.json({
+ ...lead,
+ // for backwards compatibility – will remove soon
+ clickId: lead.click.id,
+ customerId: lead.customer.id,
+ customerName: lead.customer.name,
+ customerEmail: lead.customer.email,
+ customerAvatar: lead.customer.avatar,
+ });
},
{
requiredAddOn: "conversion",