Removed URL validation.

This commit is contained in:
Mike Cao 2024-12-17 23:36:54 -08:00
parent 67164a72a0
commit 85a348c55d
2 changed files with 2 additions and 6 deletions

View file

@ -1,5 +1,4 @@
import debug from 'debug';
import { Prisma } from '@prisma/client';
import prisma from '@umami/prisma-client';
import { formatInTimeZone } from 'date-fns-tz';
import { MYSQL, POSTGRESQL, getDatabaseType } from 'lib/db';
@ -286,7 +285,7 @@ async function pagedRawQuery(
return { data, count, page: +page, pageSize: size, orderBy };
}
function getQueryMode(): { mode?: Prisma.QueryMode } {
function getQueryMode(): { mode?: 'default' | 'insensitive' } {
const db = getDatabaseType();
if (db === POSTGRESQL) {

View file

@ -31,10 +31,7 @@ const schema = {
.of(
yup.object().shape({
type: yup.string().required(),
value: yup
.string()
.matches(/^[a-zA-Z0-9/*-_]+$/, 'Invalid URL pattern')
.required(),
value: yup.string().required(),
}),
)
.min(2)