The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix includeExpandedFields in getGroups
Steven Tey6800bf107a3a
diff --git a/apps/web/lib/api/groups/get-groups.ts b/apps/web/lib/api/groups/get-groups.tsindex 5890d2e988..44cf1fb803 100644--- a/apps/web/lib/api/groups/get-groups.ts+++ b/apps/web/lib/api/groups/get-groups.ts@@ -77,7 +77,7 @@ export async function getGroups(filters: GroupFilters) {`}FROM PartnerGroup pg- LEFT JOIN ProgramEnrollment pe ON pe.groupId = pg.id AND pe.status = 'approved'+ ${includeExpandedFields ? Prisma.sql`LEFT JOIN ProgramEnrollment pe ON pe.groupId = pg.id AND pe.status = 'approved'` : Prisma.sql``}WHERE pg.programId = ${programId}${search ? Prisma.sql`AND (pg.name LIKE ${`%${search}%`} OR pg.slug LIKE ${`%${search}%`})` : Prisma.sql``}${groupIds && groupIds.length > 0 ? Prisma.sql`AND pg.id IN (${Prisma.join(groupIds)})` : Prisma.sql``}diff --git a/apps/web/lib/api/partners/get-partners.ts b/apps/web/lib/api/partners/get-partners.tsindex 11d5bf87f1..0710c42784 100644--- a/apps/web/lib/api/partners/get-partners.ts+++ b/apps/web/lib/api/partners/get-partners.ts@@ -36,13 +36,13 @@ export async function getPartners(filters: PartnerFilters) {const partners = await prisma.programEnrollment.findMany({where: {+ tenantId,programId,...(partnerIds && {partnerId: {in: partnerIds,},}),- tenantId,status,groupId,...(country || search || email