mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
Refactored queries.
This commit is contained in:
parent
18e36aa7b3
commit
b16f5cc067
67 changed files with 523 additions and 576 deletions
|
|
@ -5,7 +5,7 @@ import { NextApiRequestQueryBody, SearchFilter } from 'lib/types';
|
|||
import { pageInfo } from 'lib/schema';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { createWebsite, getWebsitesByTeamId } from 'queries';
|
||||
import { createWebsite, getTeamWebsites } from 'queries';
|
||||
import { uuid } from 'lib/crypto';
|
||||
|
||||
export interface TeamWebsiteRequestQuery extends SearchFilter {
|
||||
|
|
@ -46,7 +46,7 @@ export default async (
|
|||
|
||||
const { page, query, pageSize } = req.query;
|
||||
|
||||
const websites = await getWebsitesByTeamId(teamId, {
|
||||
const websites = await getTeamWebsites(teamId, {
|
||||
page,
|
||||
query,
|
||||
pageSize: +pageSize || undefined,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue