diff options
Diffstat (limited to 'server/initializers/checker.ts')
-rw-r--r-- | server/initializers/checker.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 71f303963..739f623c6 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts | |||
@@ -5,12 +5,12 @@ import { ApplicationModel } from '../models/application/application' | |||
5 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 5 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
6 | 6 | ||
7 | // Some checks on configuration files | 7 | // Some checks on configuration files |
8 | // Return an error message, or null if everything is okay | ||
8 | function checkConfig () { | 9 | function checkConfig () { |
9 | if (config.has('webserver.host')) { | 10 | const defaultNSFWPolicy = config.get<string>('instance.default_nsfw_policy') |
10 | let errorMessage = '`host` config key was renamed to `hostname` but it seems you still have a `host` key in your configuration files!' | ||
11 | errorMessage += ' Please ensure to rename your `host` configuration to `hostname`.' | ||
12 | 11 | ||
13 | return errorMessage | 12 | if ([ 'do_not_list', 'blur', 'display' ].indexOf(defaultNSFWPolicy) === -1) { |
13 | return 'NSFW policy setting should be "do_not_list" or "blur" or "display" instead of ' + defaultNSFWPolicy | ||
14 | } | 14 | } |
15 | 15 | ||
16 | return null | 16 | return null |
@@ -28,7 +28,8 @@ function checkMissedConfig () { | |||
28 | 'log.level', | 28 | 'log.level', |
29 | 'user.video_quota', | 29 | 'user.video_quota', |
30 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', | 30 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', |
31 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route' | 31 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', |
32 | 'instance.default_nsfw_policy' | ||
32 | ] | 33 | ] |
33 | const miss: string[] = [] | 34 | const miss: string[] = [] |
34 | 35 | ||