Skip to content

Commit f3a6f08

Browse files
committed
only send payouts/reminder emails to non deactivatedAt programs
1 parent fdc108e commit f3a6f08

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

apps/web/app/(ee)/api/cron/payouts/reminders/program-owners/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export async function GET(req: Request) {
3232
minPayoutAmount: {
3333
gt: 0,
3434
},
35+
deactivatedAt: null,
3536
},
3637
});
3738

@@ -42,8 +43,11 @@ export async function GET(req: Request) {
4243
amount: {
4344
gt: 0,
4445
},
45-
programId: {
46-
notIn: programsWithCustomMinPayouts.map((p) => p.id),
46+
program: {
47+
id: {
48+
notIn: programsWithCustomMinPayouts.map((p) => p.id),
49+
},
50+
deactivatedAt: null,
4751
},
4852
partner: {
4953
payoutsEnabledAt: {

apps/web/scripts/misc/remove-program-ban-fraud-events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { prisma } from "@dub/prisma";
22
import "dotenv-flow/config";
33

4-
// script to remove fraud events for certain campaign ids
4+
// script to remove fraud events for cross-program bans
55
async function main() {
66
const fraudEventsToRemove = await prisma.fraudEvent.findMany({
77
where: {

0 commit comments

Comments
 (0)