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.

don't fetch links count

Kiran K5cdcd24ba876
diff --git a/apps/web/lib/folder/get-folder-or-throw.ts b/apps/web/lib/folder/get-folder-or-throw.ts
index 25b3728a34..d44684e6d4 100644
--- a/apps/web/lib/folder/get-folder-or-throw.ts
+++ b/apps/web/lib/folder/get-folder-or-throw.ts
@@ -21,15 +21,11 @@ export const getFolderOrThrow = async ({
createdAt: true,
updatedAt: true,
projectId: true,
- _count: {
- select: {
- links: true,
- },
- },
users: {
where: {
userId,
},
+ take: 1,
},
},
});
@@ -52,6 +48,5 @@ export const getFolderOrThrow = async ({
createdAt: folder.createdAt,
updatedAt: folder.updatedAt,
user: folder.users.length > 0 ? folder.users[0] : null,
- linkCount: folder._count.links,
};
};