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.

Refactor endpointSchema in analytics route.ts

Kiran K2bc16d885068
diff --git a/apps/web/app/api/analytics/[endpoint]/route.ts b/apps/web/app/api/analytics/[endpoint]/route.ts
index 8e336b5890..85d64ea243 100644
--- a/apps/web/app/api/analytics/[endpoint]/route.ts
+++ b/apps/web/app/api/analytics/[endpoint]/route.ts
@@ -6,7 +6,7 @@ import z from "@/lib/zod";
import { getAnalyticsQuerySchema } from "@/lib/zod/schemas/analytics";
import { NextResponse } from "next/server";
-export const endpointSchema = z.object({
+const endpointSchema = z.object({
endpoint: z.enum(VALID_TINYBIRD_ENDPOINTS, {
errorMap: (issue, ctx) => {
return {