mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 10:35:35 +01:00
Updated zod validation on date range.
This commit is contained in:
parent
6c793325e2
commit
fb6fd293fb
10 changed files with 36 additions and 31 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { z } from 'zod';
|
||||
import { getQueryFilters, parseRequest } from '@/lib/request';
|
||||
import { json, unauthorized } from '@/lib/response';
|
||||
import { dateRangeParams, filterParams } from '@/lib/schema';
|
||||
import { filterParams, withDateRange } from '@/lib/schema';
|
||||
import { canViewWebsite } from '@/permissions';
|
||||
import { getWebsiteEventStats } from '@/queries/sql/events/getWebsiteEventStats';
|
||||
|
||||
|
|
@ -9,8 +8,7 @@ export async function GET(
|
|||
request: Request,
|
||||
{ params }: { params: Promise<{ websiteId: string }> },
|
||||
) {
|
||||
const schema = z.object({
|
||||
...dateRangeParams,
|
||||
const schema = withDateRange({
|
||||
...filterParams,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue