Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Update minimum date.

Mike Cao5c15778c9b3d
diff --git a/src/lib/date.ts b/src/lib/date.ts
index bfbfc0b91..4b9589514 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 329d155c4..d28e49e2d 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 {