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.

Let the E2E cleanup cron delete test partners with no enrollments

Rafi9ed6be123e04
diff --git a/apps/web/app/(ee)/api/cron/cleanup/e2e-tests/route.ts b/apps/web/app/(ee)/api/cron/cleanup/e2e-tests/route.ts
index 91f5a357e9..185f001175 100644
--- a/apps/web/app/(ee)/api/cron/cleanup/e2e-tests/route.ts
+++ b/apps/web/app/(ee)/api/cron/cleanup/e2e-tests/route.ts
@@ -78,13 +78,11 @@ export async function POST(req: Request) {
createdAt: {
lt: oneDayAgo,
},
- // only delete partners that are enrolled in the Acme program and nowhere else,
+ // only delete partners with no enrollments outside the Acme program,
// since bulkDeletePartners hard-deletes the Partner row and would leave
- // their enrollments in other programs orphaned
+ // their enrollments in other programs orphaned. `every` also matches
+ // partners with no enrollments, so those are cleaned up too.
programs: {
- some: {
- programId: ACME_PROGRAM_ID,
- },
every: {
programId: ACME_PROGRAM_ID,
},