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 index

Steven Teyf0548ca2dc07
diff --git a/apps/web/app/api/cron/payouts/clicks/route.ts b/apps/web/app/api/cron/payouts/clicks/route.ts
index f687d77ea8..6bf47436d7 100644
--- a/apps/web/app/api/cron/payouts/clicks/route.ts
+++ b/apps/web/app/api/cron/payouts/clicks/route.ts
@@ -16,8 +16,8 @@ export async function GET(req: Request) {
const commissions = await prisma.commission.groupBy({
by: ["programId", "partnerId"],
where: {
- type: "click",
status: "pending",
+ type: "click",
payoutId: null,
},
});
diff --git a/apps/web/app/api/cron/payouts/leads/route.ts b/apps/web/app/api/cron/payouts/leads/route.ts
index df44f8f31c..f1ce6b31d8 100644
--- a/apps/web/app/api/cron/payouts/leads/route.ts
+++ b/apps/web/app/api/cron/payouts/leads/route.ts
@@ -16,8 +16,8 @@ export async function GET(req: Request) {
const commissions = await prisma.commission.groupBy({
by: ["programId", "partnerId"],
where: {
- type: "lead",
status: "pending",
+ type: "lead",
payoutId: null,
},
});
diff --git a/apps/web/app/api/cron/payouts/sales/route.ts b/apps/web/app/api/cron/payouts/sales/route.ts
index c70f5880ce..d8995822c8 100644
--- a/apps/web/app/api/cron/payouts/sales/route.ts
+++ b/apps/web/app/api/cron/payouts/sales/route.ts
@@ -16,11 +16,11 @@ export async function GET(req: Request) {
const commissions = await prisma.commission.groupBy({
by: ["programId", "partnerId"],
where: {
+ status: "pending",
type: "sale",
- amount: {
+ earnings: {
not: 0,
},
- status: "pending",
payoutId: null,
},
});