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

Tim Wilson32d6e4f62539
diff --git a/apps/web/app/(ee)/api/messages/route.ts b/apps/web/app/(ee)/api/messages/route.ts
index afcf32b3c2..3f25a3f8f1 100644
--- a/apps/web/app/(ee)/api/messages/route.ts
+++ b/apps/web/app/(ee)/api/messages/route.ts
@@ -24,14 +24,17 @@ export const GET = withWorkspace(
const programEnrollments = await prisma.programEnrollment.findMany({
where: {
programId,
- ...(partnerId && { partnerId }),
- partner: {
- messages: {
- some: {
- programId,
- },
- },
- },
+ ...(partnerId
+ ? { partnerId }
+ : {
+ partner: {
+ messages: {
+ some: {
+ programId,
+ },
+ },
+ },
+ }),
},
include: {
partner: {