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.

revert

Kiran K7dc970018f44
diff --git a/apps/web/app/api/analytics/route.ts b/apps/web/app/api/analytics/route.ts
index 012c7014c2..1f0ee4bd8d 100644
--- a/apps/web/app/api/analytics/route.ts
+++ b/apps/web/app/api/analytics/route.ts
@@ -1,6 +1,7 @@
import { VALID_ANALYTICS_ENDPOINTS } from "@/lib/analytics/constants";
import { getAnalytics } from "@/lib/analytics/get-analytics";
import { validDateRangeForPlan } from "@/lib/analytics/utils";
+import { getDomainOrThrow } from "@/lib/api/domains/get-domain-or-throw";
import { getLinkOrThrow } from "@/lib/api/links/get-link-or-throw";
import { throwIfClicksUsageExceeded } from "@/lib/api/links/usage-checks";
import { withWorkspace } from "@/lib/auth";
@@ -40,9 +41,9 @@ export const GET = withWorkspace(
} = parsedParams;
let link: Link | null = null;
- // if (domain) {
- // await getDomainOrThrow({ workspace, domain });
- // }
+ if (domain) {
+ await getDomainOrThrow({ workspace, domain });
+ }
if (linkId || externalId || (domain && key)) {
link = await getLinkOrThrow({
diff --git a/apps/web/app/api/events/route.ts b/apps/web/app/api/events/route.ts
index 5f1e38fb5c..f543318ea9 100644
--- a/apps/web/app/api/events/route.ts
+++ b/apps/web/app/api/events/route.ts
@@ -1,5 +1,6 @@
import { getEvents } from "@/lib/analytics/get-events";
import { validDateRangeForPlan } from "@/lib/analytics/utils";
+import { getDomainOrThrow } from "@/lib/api/domains/get-domain-or-throw";
import { getLinkOrThrow } from "@/lib/api/links/get-link-or-throw";
import { throwIfClicksUsageExceeded } from "@/lib/api/links/usage-checks";
import { withWorkspace } from "@/lib/auth";
@@ -17,9 +18,9 @@ export const GET = withWorkspace(
parsedParams;
let link: Link | null = null;
- // if (domain) {
- // await getDomainOrThrow({ workspace, domain });
- // }
+ if (domain) {
+ await getDomainOrThrow({ workspace, domain });
+ }
if (linkId || externalId || (domain && key)) {
link = await getLinkOrThrow({