mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Merge branch 'dev' into analytics
This commit is contained in:
commit
562ec4331b
2 changed files with 2 additions and 6 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import { Prisma } from '@prisma/client';
|
|
||||||
import prisma from '@umami/prisma-client';
|
import prisma from '@umami/prisma-client';
|
||||||
import { formatInTimeZone } from 'date-fns-tz';
|
import { formatInTimeZone } from 'date-fns-tz';
|
||||||
import { MYSQL, POSTGRESQL, getDatabaseType } from 'lib/db';
|
import { MYSQL, POSTGRESQL, getDatabaseType } from 'lib/db';
|
||||||
|
|
@ -286,7 +285,7 @@ async function pagedRawQuery(
|
||||||
return { data, count, page: +page, pageSize: size, orderBy };
|
return { data, count, page: +page, pageSize: size, orderBy };
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQueryMode(): { mode?: Prisma.QueryMode } {
|
function getQueryMode(): { mode?: 'default' | 'insensitive' } {
|
||||||
const db = getDatabaseType();
|
const db = getDatabaseType();
|
||||||
|
|
||||||
if (db === POSTGRESQL) {
|
if (db === POSTGRESQL) {
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,7 @@ const schema = {
|
||||||
.of(
|
.of(
|
||||||
yup.object().shape({
|
yup.object().shape({
|
||||||
type: yup.string().required(),
|
type: yup.string().required(),
|
||||||
value: yup
|
value: yup.string().required(),
|
||||||
.string()
|
|
||||||
.matches(/^[a-zA-Z0-9/*-_]+$/, 'Invalid URL pattern')
|
|
||||||
.required(),
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.min(2)
|
.min(2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue