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.

update bountySubmission when partner is banned

Steven Teyeb2c48c30c76
diff --git a/apps/web/lib/actions/partners/ban-partner.ts b/apps/web/lib/actions/partners/ban-partner.ts
index 838d644ada..b33fe2839c 100644
--- a/apps/web/lib/actions/partners/ban-partner.ts
+++ b/apps/web/lib/actions/partners/ban-partner.ts
@@ -80,6 +80,18 @@ export const banPartnerAction = authActionClient
status: "canceled",
},
}),
+
+ prisma.bountySubmission.updateMany({
+ where: {
+ ...where,
+ status: {
+ not: "approved",
+ },
+ },
+ data: {
+ status: "rejected",
+ },
+ }),
]);
waitUntil(