mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
clean up events/event-data endpoints
This commit is contained in:
parent
a7a7293d73
commit
f23d5694ec
10 changed files with 59 additions and 38 deletions
|
|
@ -3,6 +3,7 @@ import { getQueryFilters, parseRequest } from '@/lib/request';
|
|||
import { unauthorized, json } from '@/lib/response';
|
||||
import { canViewWebsite } from '@/permissions';
|
||||
import { getEventDataStats } from '@/queries/sql';
|
||||
import { filterParams } from '@/lib/schema';
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
|
|
@ -11,7 +12,7 @@ export async function GET(
|
|||
const schema = z.object({
|
||||
startAt: z.coerce.number().int(),
|
||||
endAt: z.coerce.number().int(),
|
||||
propertyName: z.string().optional(),
|
||||
...filterParams,
|
||||
});
|
||||
|
||||
const { auth, query, error } = await parseRequest(request, schema);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue