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 customer.country

Kiran Kb6cc9b45defa
diff --git a/apps/web/lib/webhook/sample-events/lead-created.json b/apps/web/lib/webhook/sample-events/lead-created.json
index b38cfdd220..223c1e57f7 100644
--- a/apps/web/lib/webhook/sample-events/lead-created.json
+++ b/apps/web/lib/webhook/sample-events/lead-created.json
@@ -6,7 +6,6 @@
"name": "Tiny Beige Badger",
"email": "[email protected]",
"avatar": "https://api.dicebear.com/9.x/notionists/png?seed=cus_BH6tDUWc9n0Y2pf55tVbk1hc",
- "country": "US",
"createdAt": "2025-01-14T04:49:23.385Z"
},
"click": {
diff --git a/apps/web/lib/webhook/sample-events/sale-created.json b/apps/web/lib/webhook/sample-events/sale-created.json
index c140a95f0e..cba88dcdb7 100644
--- a/apps/web/lib/webhook/sample-events/sale-created.json
+++ b/apps/web/lib/webhook/sample-events/sale-created.json
@@ -6,7 +6,6 @@
"name": "Rural Red Goldfish",
"email": "[email protected]",
"avatar": "https://api.dicebear.com/9.x/notionists/png?seed=cus_jTrfVKYN3Buc3F80JoqBiY0g",
- "country": "US",
"createdAt": "2024-10-12T04:55:36.007Z"
},
"click": {
diff --git a/apps/web/lib/webhook/transform.ts b/apps/web/lib/webhook/transform.ts
index eb9fb50c84..98484470a6 100644
--- a/apps/web/lib/webhook/transform.ts
+++ b/apps/web/lib/webhook/transform.ts
@@ -58,6 +58,7 @@ export const transformLeadEventData = (data: any) => {
...lead,
customer: {
...customer,
+ country: undefined,
avatar:
customer.avatar ||
`https://api.dicebear.com/9.x/micah/svg?seed=${customer.id}`,
@@ -83,6 +84,7 @@ export const transformSaleEventData = (data: any) => {
...sale,
customer: {
...customer,
+ country: undefined,
avatar:
customer.avatar ||
`https://api.dicebear.com/9.x/micah/svg?seed=${customer.id}`,