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: also update link data

Snazzah94f53639c0b5
diff --git a/lib/api/links.ts b/lib/api/links.ts
index 6383254992..09ee27744a 100644
--- a/lib/api/links.ts
+++ b/lib/api/links.ts
@@ -329,6 +329,7 @@ export async function changeDomain(projectId: string, domain: string, newDomain:
const pipeline = redis.pipeline();
links.forEach(({ key }) => {
pipeline.rename(`${domain}:clicks:${key}`, `${newDomain}:clicks:${key}`);
+ pipeline.rename(`${domain}:${key}`, `${newDomain}:${key}`);
});
try {
return await pipeline.exec();