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.

Fix `getGroups` (#3280)

Kiran K49bf16680436
diff --git a/apps/web/lib/api/groups/get-groups.ts b/apps/web/lib/api/groups/get-groups.ts
index 23fc46f663..a647149b9e 100644
--- a/apps/web/lib/api/groups/get-groups.ts
+++ b/apps/web/lib/api/groups/get-groups.ts
@@ -19,7 +19,7 @@ export async function getGroups(filters: GroupFilters) {
includeExpandedFields,
} = filters;
- const groups = (await prisma.$queryRaw`
+ const groups = (await prisma.$queryRaw(Prisma.sql`
SELECT
pg.id,
pg.programId,
@@ -76,7 +76,7 @@ export async function getGroups(filters: GroupFilters) {
GROUP BY pg.id
ORDER BY ${Prisma.raw(sortBy === "createdAt" ? "pg.createdAt" : sortBy)} ${Prisma.raw(sortOrder)}
LIMIT ${pageSize} OFFSET ${(page - 1) * pageSize}
- `) satisfies Array<any>;
+ `)) satisfies Array<any>;
return groups.map((group) => ({
...group,