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.

Make the clickId belongs the same workspace

Kiran K0016d165c574
diff --git a/apps/web/lib/integrations/shopify/create-lead.ts b/apps/web/lib/integrations/shopify/create-lead.ts
index ddee4b1a47..e0ab241752 100644
--- a/apps/web/lib/integrations/shopify/create-lead.ts
+++ b/apps/web/lib/integrations/shopify/create-lead.ts
@@ -45,6 +45,12 @@ export async function createShopifyLead({
throw new ShopifyError("Click event not found. Skipping the order...");
}
+ if (clickData.workspace_id !== workspaceId) {
+ throw new ShopifyError(
+ "Click event not found in the workspace. Skipping the order...",
+ );
+ }
+
const { link_id: linkId, country, timestamp } = clickData;
const partnerLink = await prisma.link.findUnique({