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 get-groups.ts

Kiran K0ed6809e7f3f
diff --git a/apps/web/lib/api/groups/get-groups.ts b/apps/web/lib/api/groups/get-groups.ts
index f869a15147..15d36722a8 100644
--- a/apps/web/lib/api/groups/get-groups.ts
+++ b/apps/web/lib/api/groups/get-groups.ts
@@ -31,6 +31,8 @@ export async function getGroups(filters: GroupFilters) {
includeExpandedFields,
} = filters;
+ console.time("getGroups");
+
const groups = (await prisma.$queryRaw`
SELECT
pg.id,
@@ -91,6 +93,8 @@ export async function getGroups(filters: GroupFilters) {
LIMIT ${pageSize} OFFSET ${(page - 1) * pageSize}
`) satisfies Array<any>;
+ console.timeEnd("getGroups");
+
return groups.map((group) => ({
...group,
partners: Number(group.partners),