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 route.ts

Kiran Kcea982900de4
diff --git a/apps/web/app/(ee)/api/commissions/route.ts b/apps/web/app/(ee)/api/commissions/route.ts
index 45f57661a6..ce4185e321 100644
--- a/apps/web/app/(ee)/api/commissions/route.ts
+++ b/apps/web/app/(ee)/api/commissions/route.ts
@@ -21,6 +21,7 @@ export const GET = withWorkspace(async ({ workspace, searchParams }) => {
payoutId,
partnerId,
invoiceId,
+ groupId,
page,
pageSize,
sortBy,
@@ -56,6 +57,15 @@ export const GET = withWorkspace(async ({ workspace, searchParams }) => {
gte: startDate.toISOString(),
lte: endDate.toISOString(),
},
+ ...(groupId && {
+ partner: {
+ programs: {
+ every: {
+ groupId,
+ },
+ },
+ },
+ }),
},
include: {
customer: true,