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 excludeRoot

Kiran K78d6ac7a2cef
diff --git a/apps/web/app/api/cron/links/event/route.ts b/apps/web/app/api/cron/links/event/route.ts
index b04cfc5583..2b04926d4c 100644
--- a/apps/web/app/api/cron/links/event/route.ts
+++ b/apps/web/app/api/cron/links/event/route.ts
@@ -143,7 +143,6 @@ export async function POST(req: Request) {
linkId,
endpoint: "clicks",
interval: "30d",
- excludeRoot: false,
});
// update old and new project usage
diff --git a/apps/web/app/api/og/analytics/route.tsx b/apps/web/app/api/og/analytics/route.tsx
index 9e7c7b53f3..d05e51f155 100644
--- a/apps/web/app/api/og/analytics/route.tsx
+++ b/apps/web/app/api/og/analytics/route.tsx
@@ -36,7 +36,6 @@ export async function GET(req: NextRequest) {
linkId: link.id,
endpoint: "timeseries",
interval: "30d",
- excludeRoot: false
});
const maxClicks = Math.max(...timeseries.map((t) => t.clicks));
diff --git a/apps/web/lib/zod/schemas/analytics.ts b/apps/web/lib/zod/schemas/analytics.ts
index 7ef9808dab..d69bb368f6 100644
--- a/apps/web/lib/zod/schemas/analytics.ts
+++ b/apps/web/lib/zod/schemas/analytics.ts
@@ -16,8 +16,8 @@ export const getAnalyticsQuerySchema = z.object({
key: z.string().optional().describe("The short link slug."),
interval: z
.enum(intervals)
- .optional()
.default("24h")
+ .optional()
.describe("The interval to retrieve analytics for."),
country: z
.enum(countryCodes)
@@ -39,8 +39,8 @@ export const getAnalyticsQuerySchema = z.object({
.describe("The referer to retrieve analytics for."),
url: z.string().optional().describe("The URL to retrieve analytics for."),
excludeRoot: booleanQuerySchema
- .optional()
.default("false")
+ .optional()
.describe("Whether to exclude the root link from the response."),
});