diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 16:33:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 16:33:40 +0100 |
commit | d85798c4e7b18f3b464fa819ffc5bec06137e3e9 (patch) | |
tree | 56fe546d0d237676c3f9b462bba12156e5d82225 /server/initializers/checker-before-init.ts | |
parent | 2ba92871319d7af63472c1380664a9f9eeb1c690 (diff) | |
download | PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.gz PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.zst PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.zip |
Better videos redundancy config error handling
Diffstat (limited to 'server/initializers/checker-before-init.ts')
-rw-r--r-- | server/initializers/checker-before-init.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 3e1d2c589..ef12b3eea 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import * as config from 'config' | 1 | import * as config from 'config' |
2 | import { promisify0 } from '../helpers/core-utils' | 2 | import { promisify0 } from '../helpers/core-utils' |
3 | import { isArray } from '../helpers/custom-validators/misc' | ||
4 | 3 | ||
5 | // ONLY USE CORE MODULES IN THIS FILE! | 4 | // ONLY USE CORE MODULES IN THIS FILE! |
6 | 5 | ||
@@ -42,7 +41,8 @@ function checkMissedConfig () { | |||
42 | } | 41 | } |
43 | 42 | ||
44 | const redundancyVideos = config.get<any>('redundancy.videos.strategies') | 43 | const redundancyVideos = config.get<any>('redundancy.videos.strategies') |
45 | if (isArray(redundancyVideos)) { | 44 | |
45 | if (Array.isArray(redundancyVideos)) { | ||
46 | for (const r of redundancyVideos) { | 46 | for (const r of redundancyVideos) { |
47 | if (!r.size) miss.push('redundancy.videos.strategies.size') | 47 | if (!r.size) miss.push('redundancy.videos.strategies.size') |
48 | if (!r.min_lifetime) miss.push('redundancy.videos.strategies.min_lifetime') | 48 | if (!r.min_lifetime) miss.push('redundancy.videos.strategies.min_lifetime') |