aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-07 14:56:07 +0100
committerChocobozzz <me@florianbigard.com>2020-01-07 15:56:07 +0100
commit7cde3b9c2e84ea20bb0aae4544598483cde9e22c (patch)
tree0860fd5a78127b2cf944b62eb88dc7e1ac3a3ddc /server/controllers/api
parent60815a79219b13da2127ddbbf3bf6ab8853431c5 (diff)
downloadPeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.tar.gz
PeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.tar.zst
PeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.zip
Update validator dependency
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/config.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index b2f23c1b0..6fad82408 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -12,7 +12,7 @@ import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '..
12import { remove, writeJSON } from 'fs-extra' 12import { remove, writeJSON } from 'fs-extra'
13import { getServerCommit } from '../../helpers/utils' 13import { getServerCommit } from '../../helpers/utils'
14import { Emailer } from '../../lib/emailer' 14import { Emailer } from '../../lib/emailer'
15import { isNumeric } from 'validator' 15import validator from 'validator'
16import { objectConverter } from '../../helpers/core-utils' 16import { objectConverter } from '../../helpers/core-utils'
17import { CONFIG, reloadConfig } from '../../initializers/config' 17import { CONFIG, reloadConfig } from '../../initializers/config'
18import { PluginManager } from '../../lib/plugins/plugin-manager' 18import { PluginManager } from '../../lib/plugins/plugin-manager'
@@ -393,7 +393,7 @@ function convertCustomConfigBody (body: CustomConfig) {
393 } 393 }
394 394
395 function valueConverter (v: any) { 395 function valueConverter (v: any) {
396 if (isNumeric(v + '')) return parseInt('' + v, 10) 396 if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
397 397
398 return v 398 return v
399 } 399 }