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 route.ts

Tim Wilsoneb5880393168
diff --git a/apps/web/app/api/analytics/dashboard/route.ts b/apps/web/app/api/analytics/dashboard/route.ts
index 4eea1b71b4..50db373864 100644
--- a/apps/web/app/api/analytics/dashboard/route.ts
+++ b/apps/web/app/api/analytics/dashboard/route.ts
@@ -132,7 +132,7 @@ export const GET = async (req: Request) => {
const { success } = await ratelimit(
demoLink ? 15 : 10,
!demoLink || groupBy === "count" ? "10 s" : "1 m",
- ).limit(`analytics-dashboard:${link.id}:${ip}:${groupBy}`);
+ ).limit(`analytics-dashboard:${folder?.id || link?.id}:${ip}:${groupBy}`);
if (!success) {
throw new DubApiError({