mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 01:55:36 +01:00
Fixed editing and navigation issues.
This commit is contained in:
parent
bf6c9395c6
commit
8c26e310f7
52 changed files with 118 additions and 122 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { z } from 'zod';
|
||||
import { parseRequest, getQueryFilters, setWebsiteDate } from '@/lib/request';
|
||||
import { parseRequest, getQueryFilters } from '@/lib/request';
|
||||
import { unauthorized, json } from '@/lib/response';
|
||||
import { canViewWebsite } from '@/lib/auth';
|
||||
import { filterParams } from '@/lib/schema';
|
||||
import { dateRangeParams, filterParams } from '@/lib/schema';
|
||||
import { getWebsiteStats } from '@/queries';
|
||||
import { getCompareDate } from '@/lib/date';
|
||||
|
||||
|
|
@ -11,9 +11,8 @@ export async function GET(
|
|||
{ params }: { params: Promise<{ websiteId: string }> },
|
||||
) {
|
||||
const schema = z.object({
|
||||
startAt: z.coerce.number().int(),
|
||||
endAt: z.coerce.number().int(),
|
||||
compare: z.string().optional(),
|
||||
...dateRangeParams,
|
||||
...filterParams,
|
||||
});
|
||||
|
||||
|
|
@ -29,7 +28,7 @@ export async function GET(
|
|||
return unauthorized();
|
||||
}
|
||||
|
||||
const filters = await setWebsiteDate(websiteId, getQueryFilters(query));
|
||||
const filters = await getQueryFilters(query, websiteId);
|
||||
|
||||
const data = await getWebsiteStats(websiteId, filters);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue