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.

Skip claiming broadcasts that have been rescheduled into the future.

Kiran Kc8d629d6d1a6
diff --git a/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts b/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
index fdc7a75cb3..9cae722a3b 100644
--- a/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
+++ b/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
@@ -118,6 +118,7 @@ export async function POST(req: Request) {
where: {
id: campaignId,
status: CampaignStatus.scheduled,
+ OR: [{ scheduledAt: null }, { scheduledAt: { lte: new Date() } }],
},
data: {
status: CampaignStatus.sending,