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.

remove unique check

Steven Teyd540d1a7064b
diff --git a/apps/web/app/api/track/lead/route.ts b/apps/web/app/api/track/lead/route.ts
index eb88f0e623..d29b210aab 100644
--- a/apps/web/app/api/track/lead/route.ts
+++ b/apps/web/app/api/track/lead/route.ts
@@ -62,22 +62,6 @@ export const POST = withWorkspaceEdge(
});
}
- const customer = await prismaEdge.customer.findUnique({
- where: {
- projectId_externalId: {
- projectId: workspace.id,
- externalId: customerExternalId,
- },
- },
- });
-
- if (customer) {
- throw new DubApiError({
- code: "conflict",
- message: `A customer with externalId ${customerExternalId} already exists. Use PATCH /api/customers/${customer.id} to update it.`,
- });
- }
-
const finalCustomerName =
customerName || customerEmail || generateRandomName();