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.

final changes

Steven Teyb808a1d15d76
diff --git a/apps/web/app/(ee)/api/cron/link-retention-cleanup/route.ts b/apps/web/app/(ee)/api/cron/link-retention-cleanup/route.ts
index 4f4218ad6b..cfc0926495 100644
--- a/apps/web/app/(ee)/api/cron/link-retention-cleanup/route.ts
+++ b/apps/web/app/(ee)/api/cron/link-retention-cleanup/route.ts
@@ -42,7 +42,12 @@ const MAX_LINK_BATCHES = 10;
async function deleteOldLinks(
domain: Pick<Domain, "id" | "slug" | "linkRetentionDays" | "projectId">,
) {
- if (!domain.linkRetentionDays || !domain.projectId) return;
+ if (
+ !domain.linkRetentionDays ||
+ !domain.projectId ||
+ domain.linkRetentionDays <= 0
+ )
+ return;
let processedBatches = 0;
@@ -89,10 +94,6 @@ async function deleteOldLinks(
});
});
- console.log(
- `[Link retention cleanup] Deleted ${links.length} links for ${domain}!`,
- );
-
// // Record the links deletion in Tinybird
// // not 100% sure if we need this yet, maybe we should just delete the link completely from TB to save space?
await recordLinkTB(