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.

fixes

Steven Tey63ef61ad3d34
diff --git a/apps/web/lib/analytics/utils/get-start-end-dates.ts b/apps/web/lib/analytics/utils/get-start-end-dates.ts
index 989f9a8a12..0ad14a3286 100644
--- a/apps/web/lib/analytics/utils/get-start-end-dates.ts
+++ b/apps/web/lib/analytics/utils/get-start-end-dates.ts
@@ -7,8 +7,8 @@ export const getStartEndDates = ({
end,
}: {
interval?: string;
- start?: string | Date;
- end?: string | Date;
+ start?: string | Date | null;
+ end?: string | Date | null;
}) => {
let startDate: Date;
let endDate: Date;
diff --git a/apps/web/lib/zod/schemas/analytics.ts b/apps/web/lib/zod/schemas/analytics.ts
index 3d3951f746..66a96c2eec 100644
--- a/apps/web/lib/zod/schemas/analytics.ts
+++ b/apps/web/lib/zod/schemas/analytics.ts
@@ -85,18 +85,20 @@ export const analyticsQuerySchema = z.object({
.enum(intervals)
.optional()
.describe(
- "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.",
+ "The interval to retrieve analytics for. If undefined, defaults to 24h.",
),
start: parseDateSchema
.refine((value: Date) => value >= DUB_FOUNDING_DATE, {
message: `The start date cannot be earlier than ${formatDate(DUB_FOUNDING_DATE)}.`,
})
.optional()
- .describe("The start date and time when to retrieve analytics from."),
+ .describe(
+ "The start date and time when to retrieve analytics from. Takes precedence over `interval`.",
+ ),
end: parseDateSchema
.optional()
.describe(
- "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",
+ "The end date and time when to retrieve analytics from. If not provided, defaults to the current date. Takes precedence over `interval`.",
),
timezone: z
.string()