Update validator dependency

This commit is contained in:
Chocobozzz 2020-01-07 14:56:07 +01:00
parent 60815a7921
commit 7cde3b9c2e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
30 changed files with 108 additions and 111 deletions

View file

@ -12,7 +12,7 @@ import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '..
import { remove, writeJSON } from 'fs-extra'
import { getServerCommit } from '../../helpers/utils'
import { Emailer } from '../../lib/emailer'
import { isNumeric } from 'validator'
import validator from 'validator'
import { objectConverter } from '../../helpers/core-utils'
import { CONFIG, reloadConfig } from '../../initializers/config'
import { PluginManager } from '../../lib/plugins/plugin-manager'
@ -393,7 +393,7 @@ function convertCustomConfigBody (body: CustomConfig) {
}
function valueConverter (v: any) {
if (isNumeric(v + '')) return parseInt('' + v, 10)
if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
return v
}