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.

Update route.ts

Kiran Kbf709e38bd59
diff --git a/apps/web/app/(ee)/api/cron/groups/update-default-links/route.ts b/apps/web/app/(ee)/api/cron/groups/update-default-links/route.ts
index f7d3ba3777..6027a38ba9 100644
--- a/apps/web/app/(ee)/api/cron/groups/update-default-links/route.ts
+++ b/apps/web/app/(ee)/api/cron/groups/update-default-links/route.ts
@@ -24,6 +24,16 @@ const schema = z.object({
cursor: z.string().optional(),
});
+/**
+ * Cron job to update existing partner links when a group's default link configuration changes.
+ *
+ * For each link associated with a default link, it updates the domain and URL
+ * to match the new default link configuration while preserving UTM parameters.
+ *
+ * It processes up to MAX_BATCH * PAGE_SIZE links per execution
+ * and schedules additional jobs if needed.
+ */
+
// POST /api/cron/groups/update-default-links
export async function POST(req: Request) {
try {