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.

fix merge conflict

Steven Tey4a5f9f87ac24
diff --git a/apps/web/app/api/track/click/route.ts b/apps/web/app/api/track/click/route.ts
index efb9e754bf..8098f7c78b 100644
--- a/apps/web/app/api/track/click/route.ts
+++ b/apps/web/app/api/track/click/route.ts
@@ -31,8 +31,7 @@ export const POST = withAxiom(async (req: AxiomRequest) => {
const ip = process.env.VERCEL === "1" ? ipAddress(req) : LOCALHOST_IP;
- const cacheKey = `recordClick:${domain}:${key}:${ip}`;
- let clickId = await redis.get<string>(cacheKey);
+ let clickId = await clickCache.get({ domain, key, ip });
// only generate + record a new click ID if it's not already cached in Redis
if (!clickId) {
@@ -50,7 +49,6 @@ export const POST = withAxiom(async (req: AxiomRequest) => {
const allowedHostnames = link.allowedHostnames;
verifyAnalyticsAllowedHostnames({ allowedHostnames, req });
- let clickId = await clickCache.get({ domain, key, ip });
const finalUrl = isValidUrl(url) ? url : link.url;
waitUntil(