mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Update admin/website search. Update param names.
This commit is contained in:
parent
0fc8828f8b
commit
4e2bfd7485
17 changed files with 90 additions and 77 deletions
|
|
@ -5,7 +5,7 @@ import { MYSQL, POSTGRESQL, getDatabaseType } from 'lib/db';
|
|||
import { SESSION_COLUMNS, OPERATORS, DEFAULT_PAGE_SIZE } from './constants';
|
||||
import { fetchWebsite } from './load';
|
||||
import { maxDate } from './date';
|
||||
import { QueryFilters, QueryOptions, SearchFilter } from './types';
|
||||
import { QueryFilters, QueryOptions, PageParams } from './types';
|
||||
import { filtersToArray } from './params';
|
||||
|
||||
const MYSQL_DATE_FORMATS = {
|
||||
|
|
@ -191,7 +191,7 @@ async function rawQuery(sql: string, data: object): Promise<any> {
|
|||
return prisma.rawQuery(query, params);
|
||||
}
|
||||
|
||||
async function pagedQuery<T>(model: string, criteria: T, filters: SearchFilter) {
|
||||
async function pagedQuery<T>(model: string, criteria: T, filters: PageParams) {
|
||||
const { page = 1, pageSize, orderBy, sortDescending = false } = filters || {};
|
||||
const size = +pageSize || DEFAULT_PAGE_SIZE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue