diff options
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 | } |