diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-07 14:56:07 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-07 15:56:07 +0100 |
commit | 7cde3b9c2e84ea20bb0aae4544598483cde9e22c (patch) | |
tree | 0860fd5a78127b2cf944b62eb88dc7e1ac3a3ddc /server/controllers | |
parent | 60815a79219b13da2127ddbbf3bf6ab8853431c5 (diff) | |
download | PeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.tar.gz PeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.tar.zst PeerTube-7cde3b9c2e84ea20bb0aae4544598483cde9e22c.zip |
Update validator dependency
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/config.ts | 4 |
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 '.. | |||
12 | import { remove, writeJSON } from 'fs-extra' | 12 | import { remove, writeJSON } from 'fs-extra' |
13 | import { getServerCommit } from '../../helpers/utils' | 13 | import { getServerCommit } from '../../helpers/utils' |
14 | import { Emailer } from '../../lib/emailer' | 14 | import { Emailer } from '../../lib/emailer' |
15 | import { isNumeric } from 'validator' | 15 | import validator from 'validator' |
16 | import { objectConverter } from '../../helpers/core-utils' | 16 | import { objectConverter } from '../../helpers/core-utils' |
17 | import { CONFIG, reloadConfig } from '../../initializers/config' | 17 | import { CONFIG, reloadConfig } from '../../initializers/config' |
18 | import { PluginManager } from '../../lib/plugins/plugin-manager' | 18 | import { 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 | } |