The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update route.ts
Kiran K079e4b763745
diff --git a/apps/web/app/(ee)/api/cron/links/create-promotion-codes/route.ts b/apps/web/app/(ee)/api/cron/links/create-promotion-codes/route.tsindex 1f7a204cca..8eba5df698 100644--- a/apps/web/app/(ee)/api/cron/links/create-promotion-codes/route.ts+++ b/apps/web/app/(ee)/api/cron/links/create-promotion-codes/route.ts@@ -14,6 +14,17 @@ const schema = z.object({page: z.number().optional().default(0),});+/**+ * Cron job to create Stripe promotion codes for partner links+ *+ * This job processes partner links in batches to create unique Stripe promotion codes+ * for each link associated with a specific discount. It paginates through program+ * enrollments in a partner group, finds links that don't have coupon codes yet,+ * and creates promotion codes in batches of 10 to respect Stripe's rate limits.+ *+ * It automatically schedules the next batch until all eligible links have been processed.+ */+// POST /api/cron/links/create-promotion-codesexport async function POST(req: Request) {try {