Rename to torAllowed

This commit is contained in:
ekzyis 2024-07-17 01:03:45 +02:00
parent 6432ea7b44
commit 667cde6042
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ function generateSchema (wallet, { me }) {
: validator : validator
.url() .url()
.test(async (url, context) => { .test(async (url, context) => {
if (field.validate.onionAllowed && TOR_REGEXP.test(url)) { if (field.validate.torAllowed && TOR_REGEXP.test(url)) {
// allow HTTP and HTTPS over Tor // allow HTTP and HTTPS over Tor
if (!/^https?:\/\//.test(url)) { if (!/^https?:\/\//.test(url)) {
return context.createError({ message: 'http or https required' }) return context.createError({ message: 'http or https required' })

View File

@ -7,7 +7,7 @@ export const fields = [
type: 'text', type: 'text',
validate: { validate: {
type: 'url', type: 'url',
onionAllowed: true torAllowed: true
} }
}, },
{ {