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.

only update pending items

Steven Tey0d566104b95a
diff --git a/apps/web/lib/actions/partners/ban-partner.ts b/apps/web/lib/actions/partners/ban-partner.ts
index 7163b21fe9..3e0eb5b1c8 100644
--- a/apps/web/lib/actions/partners/ban-partner.ts
+++ b/apps/web/lib/actions/partners/ban-partner.ts
@@ -62,14 +62,20 @@ export const banPartnerAction = authActionClient
}),
prisma.commission.updateMany({
- where,
+ where: {
+ ...where,
+ status: "pending",
+ },
data: {
status: "canceled",
},
}),
prisma.payout.updateMany({
- where,
+ where: {
+ ...where,
+ status: "pending",
+ },
data: {
status: "canceled",
},