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 Kafd4c545bcc4
diff --git a/apps/web/app/(ee)/api/partners/count/route.ts b/apps/web/app/(ee)/api/partners/count/route.ts
index 792656a815..d9417da653 100644
--- a/apps/web/app/(ee)/api/partners/count/route.ts
+++ b/apps/web/app/(ee)/api/partners/count/route.ts
@@ -59,15 +59,15 @@ export const GET = withWorkspace(
by: ["status"],
where: {
programId,
+ ...(groupId && {
+ groupId,
+ }),
partner: {
...(country && {
country,
}),
...commonWhere,
},
- ...(groupId && {
- groupId,
- }),
},
_count: true,
});
@@ -117,18 +117,14 @@ export const GET = withWorkspace(
status: status || {
in: ["approved", "invited"],
},
+ ...(groupId && {
+ groupId,
+ }),
partner: {
...(country && {
country,
}),
...commonWhere,
- ...(groupId && {
- programs: {
- some: {
- groupId,
- },
- },
- }),
},
},
});