From 5c15778c9b3d626c8b2860e228d3dda46102c76b Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 3 Oct 2023 15:50:33 -0700 Subject: [PATCH] Update minimum date. --- src/lib/date.ts | 2 +- src/pages/api/websites/index.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/date.ts b/src/lib/date.ts index bfbfc0b9..4b958951 100644 --- a/src/lib/date.ts +++ b/src/lib/date.ts @@ -248,7 +248,7 @@ export function getMinimumUnit(startDate, endDate) { return 'minute'; } else if (differenceInHours(endDate, startDate) <= 48) { return 'hour'; - } else if (differenceInCalendarDays(endDate, startDate) <= 90) { + } else if (differenceInCalendarMonths(endDate, startDate) <= 12) { return 'day'; } else if (differenceInCalendarMonths(endDate, startDate) <= 24) { return 'month'; diff --git a/src/pages/api/websites/index.ts b/src/pages/api/websites/index.ts index 329d155c..d28e49e2 100644 --- a/src/pages/api/websites/index.ts +++ b/src/pages/api/websites/index.ts @@ -34,7 +34,6 @@ export default async ( ) => { await useCors(req, res); await useAuth(req, res); - await useValidate(schema, req, res); const {