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.

fix /api/analytics/clicks

Kiran K264ebe36dff5
diff --git a/apps/web/app/api/analytics/[eventType]/route.ts b/apps/web/app/api/analytics/[eventType]/route.ts
new file mode 100644
index 0000000000..756a27cb54
--- /dev/null
+++ b/apps/web/app/api/analytics/[eventType]/route.ts
@@ -0,0 +1 @@
+export * from "../route";
diff --git a/apps/web/tests/analytics/leads.test.ts b/apps/web/tests/analytics/leads.test.ts
index 326c460ed2..8b202d47fe 100644
--- a/apps/web/tests/analytics/leads.test.ts
+++ b/apps/web/tests/analytics/leads.test.ts
@@ -2,10 +2,11 @@ import { VALID_ANALYTICS_ENDPOINTS } from "@/lib/analytics/constants";
import z from "@/lib/zod";
import { leadAnalyticsResponse } from "@/lib/zod/schemas/leads-analytics";
import { describe, expect, test } from "vitest";
+import { env } from "../utils/env";
import { IntegrationHarness } from "../utils/integration";
import { filter } from "./utils";
-describe.sequential("GET /analytics?event=leads", async () => {
+describe.runIf(env.CI).sequential("GET /analytics?event=leads", async () => {
const h = new IntegrationHarness();
const { workspace, http } = await h.init();
const { workspaceId } = workspace;
diff --git a/apps/web/tests/analytics/sales.test.ts b/apps/web/tests/analytics/sales.test.ts
index 9e4c06264c..0e97c1ab37 100644
--- a/apps/web/tests/analytics/sales.test.ts
+++ b/apps/web/tests/analytics/sales.test.ts
@@ -2,10 +2,11 @@ import { VALID_ANALYTICS_ENDPOINTS } from "@/lib/analytics/constants";
import z from "@/lib/zod";
import { saleAnalyticsResponse } from "@/lib/zod/schemas/sales-analytics";
import { describe, expect, test } from "vitest";
+import { env } from "../utils/env";
import { IntegrationHarness } from "../utils/integration";
import { filter } from "./utils";
-describe.sequential("GET /analytics?event=sales", async () => {
+describe.runIf(env.CI).sequential("GET /analytics?event=sales", async () => {
const h = new IntegrationHarness();
const { workspace, http } = await h.init();
const { workspaceId } = workspace;