mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
New admin section.
This commit is contained in:
parent
b78ff3b477
commit
ce1f6c3618
44 changed files with 515 additions and 157 deletions
|
|
@ -197,7 +197,7 @@ async function rawQuery(sql: string, data: object): Promise<any> {
|
|||
}
|
||||
|
||||
async function pagedQuery<T>(model: string, criteria: T, filters?: QueryFilters) {
|
||||
const { page = 1, pageSize, orderBy, sortDescending = false } = filters || {};
|
||||
const { page = 1, pageSize, orderBy, sortDescending = false, search } = filters || {};
|
||||
const size = +pageSize || DEFAULT_PAGE_SIZE;
|
||||
|
||||
const data = await client[model].findMany({
|
||||
|
|
@ -216,7 +216,7 @@ async function pagedQuery<T>(model: string, criteria: T, filters?: QueryFilters)
|
|||
|
||||
const count = await client[model].count({ where: (criteria as any).where });
|
||||
|
||||
return { data, count, page: +page, pageSize: size, orderBy };
|
||||
return { data, count, page: +page, pageSize: size, orderBy, search };
|
||||
}
|
||||
|
||||
async function pagedRawQuery(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue