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.

skip folderId filtering in getLinksCount if groupBy === 'folderId"

Steven Tey5fab5545924a
diff --git a/apps/web/lib/api/links/get-links-count.ts b/apps/web/lib/api/links/get-links-count.ts
index 6cb89a5792..fa4fe28adc 100644
--- a/apps/web/lib/api/links/get-links-count.ts
+++ b/apps/web/lib/api/links/get-links-count.ts
@@ -43,11 +43,13 @@ export async function getLinksCount({
],
},
]
- : [
- {
- folderId: folderId || null,
- },
- ]),
+ : groupBy !== "folderId"
+ ? [
+ {
+ folderId: folderId || null,
+ },
+ ]
+ : []),
...(search
? [
{