mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
clean-up event/event-data endpoints. fix for expanded view for mobile
This commit is contained in:
parent
9df012084d
commit
a2b1089e62
8 changed files with 47 additions and 21 deletions
|
|
@ -19,7 +19,7 @@ export async function GET(
|
|||
return unauthorized();
|
||||
}
|
||||
|
||||
const data = await getEventData(eventId);
|
||||
const data = await getEventData(websiteId, eventId);
|
||||
|
||||
return json(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { getQueryFilters, parseRequest } from '@/lib/request';
|
|||
import { unauthorized, json } from '@/lib/response';
|
||||
import { canViewWebsite } from '@/permissions';
|
||||
import { getEventDataEvents } from '@/queries/sql/events/getEventDataEvents';
|
||||
import { filterParams } from '@/lib/schema';
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
|
|
@ -12,6 +13,7 @@ export async function GET(
|
|||
startAt: z.coerce.number().int(),
|
||||
endAt: z.coerce.number().int(),
|
||||
event: z.string().optional(),
|
||||
...filterParams,
|
||||
});
|
||||
const { auth, query, error } = await parseRequest(request, schema);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue