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.

missed a few spots

Steven Tey0d325d969b98
diff --git a/apps/web/lib/auth/index.ts b/apps/web/lib/auth/index.ts
index a5dcdd9430..aea552bcfe 100644
--- a/apps/web/lib/auth/index.ts
+++ b/apps/web/lib/auth/index.ts
@@ -125,8 +125,8 @@ export const withAuth =
const url = new URL(req.url || "", API_DOMAIN);
- if (url.pathname.includes("/stats")) {
- return new Response("API access is not available for stats yet.", {
+ if (url.pathname.includes("/analytics")) {
+ return new Response("API access is not available for Analytics yet.", {
status: 403,
});
}
diff --git a/apps/web/ui/analytics/index.tsx b/apps/web/ui/analytics/index.tsx
index 341f21f7c1..a098613941 100644
--- a/apps/web/ui/analytics/index.tsx
+++ b/apps/web/ui/analytics/index.tsx
@@ -97,8 +97,8 @@ export default function Analytics({ staticDomain }: { staticDomain?: string }) {
return (
<AnalyticsContext.Provider
value={{
- basePath, // basePath for the page (e.g. /stats/[key], /links/[key], /[slug]/[domain]/[key])
- baseApiPath, // baseApiPath for the API (e.g. /api/links/[key]/stats)
+ basePath, // basePath for the page (e.g. /stats/[key], /[slug]/analytics)
+ baseApiPath, // baseApiPath for the API (e.g. /api/analytics)
queryString,
domain: domain || undefined, // domain for the link (e.g. dub.sh, stey.me, etc.)
key: key ? decodeURIComponent(key) : undefined, // link key (e.g. github, weathergpt, etc.)
diff --git a/apps/web/ui/links/link-card.tsx b/apps/web/ui/links/link-card.tsx
index b34f0b1c25..c21cd7a3ff 100644
--- a/apps/web/ui/links/link-card.tsx
+++ b/apps/web/ui/links/link-card.tsx
@@ -96,7 +96,7 @@ export default function LinkCard({
isVisible &&
slug &&
!exceededClicks &&
- `/api/projects/${slug}/stats/clicks?domain=${domain}&key=${key}`,
+ `/api/analytics/clicks?projectSlug=${slug}&domain=${domain}&key=${key}`,
fetcher,
{
fallbackData: props.clicks,