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.

add aggregate-clicks cron

Steven Tey65b8cc380c1d
diff --git a/apps/web/app/api/cron/aggregate-clicks/route.ts b/apps/web/app/api/cron/aggregate-clicks/route.ts
index 2e1502ac36..cafe6e04df 100644
--- a/apps/web/app/api/cron/aggregate-clicks/route.ts
+++ b/apps/web/app/api/cron/aggregate-clicks/route.ts
@@ -11,12 +11,6 @@ export const dynamic = "force-dynamic";
/**
* TODO:
* - Use a cron job (similar to how we do it for usage cron) to account for the future where we have a lot of links to process
- * - Might be better to read directly from the Reward table and fetch relevant links from there
- * - Once these are ready, we'll add back the cron job in vercel.json
- {
- "path": "/api/cron/aggregate-clicks",
- "schedule": "0 0 * * *"
- },
*/
// This route is used aggregate clicks events on daily basis for Program links and add to the Commission table
diff --git a/apps/web/vercel.json b/apps/web/vercel.json
index 36931d194c..d3091c3b72 100644
--- a/apps/web/vercel.json
+++ b/apps/web/vercel.json
@@ -28,6 +28,10 @@
"path": "/api/cron/payouts/sales",
"schedule": "0 * * * *"
},
+ {
+ "path": "/api/cron/aggregate-clicks",
+ "schedule": "0 0 * * *"
+ },
{
"path": "/api/cron/trigger-withdrawal",
"schedule": "0 0,12 * * *"