mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Refactor filter handling for queries.
This commit is contained in:
parent
5b300f1ff5
commit
ee6c68d27c
107 changed files with 731 additions and 835 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { z } from 'zod';
|
||||
import { unauthorized, json } from '@/lib/response';
|
||||
import { canViewTeam } from '@/lib/auth';
|
||||
import { parseRequest } from '@/lib/request';
|
||||
import { getQueryFilters, parseRequest } from '@/lib/request';
|
||||
import { pagingParams } from '@/lib/schema';
|
||||
import { getTeamWebsites } from '@/queries';
|
||||
|
||||
|
|
@ -20,7 +20,9 @@ export async function GET(request: Request, { params }: { params: Promise<{ team
|
|||
return unauthorized();
|
||||
}
|
||||
|
||||
const websites = await getTeamWebsites(teamId, query);
|
||||
const filters = await getQueryFilters(query);
|
||||
|
||||
const websites = await getTeamWebsites(teamId, filters);
|
||||
|
||||
return json(websites);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue