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.

Remove `The end date cannot be in future.` validation

Kiran Kc0d579ae9183
diff --git a/apps/web/lib/zod/schemas/analytics.ts b/apps/web/lib/zod/schemas/analytics.ts
index ef0fa1816b..6b265a2148 100644
--- a/apps/web/lib/zod/schemas/analytics.ts
+++ b/apps/web/lib/zod/schemas/analytics.ts
@@ -56,15 +56,6 @@ export const clickAnalyticsQuerySchema = z.object({
.optional()
.describe("The start date and time when to retrieve analytics from."),
end: parseDateSchema
- .refine(
- (value: Date) => {
- const todaysDate = new Date();
- return value <= todaysDate;
- },
- {
- message: "The end date cannot be in future.",
- },
- )
.optional()
.describe(
"The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",