diff options
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r-- | server/initializers/checker-after-init.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index c0a6c41ab..7a9e07482 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { util, has, get } from 'config' | 1 | import config from 'config' |
2 | import { uniq } from 'lodash' | 2 | import { uniq } from 'lodash' |
3 | import { URL } from 'url' | 3 | import { URL } from 'url' |
4 | import { getFFmpegVersion } from '@server/helpers/ffmpeg-utils' | 4 | import { getFFmpegVersion } from '@server/helpers/ffmpeg-utils' |
@@ -7,9 +7,9 @@ import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | |||
7 | import { isProdInstance, isTestInstance, parseSemVersion } from '../helpers/core-utils' | 7 | import { isProdInstance, isTestInstance, parseSemVersion } from '../helpers/core-utils' |
8 | import { isArray } from '../helpers/custom-validators/misc' | 8 | import { isArray } from '../helpers/custom-validators/misc' |
9 | import { logger } from '../helpers/logger' | 9 | import { logger } from '../helpers/logger' |
10 | import { UserModel } from '../models/user/user' | ||
11 | import { ApplicationModel, getServerActor } from '../models/application/application' | 10 | import { ApplicationModel, getServerActor } from '../models/application/application' |
12 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 11 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
12 | import { UserModel } from '../models/user/user' | ||
13 | import { CONFIG, isEmailEnabled } from './config' | 13 | import { CONFIG, isEmailEnabled } from './config' |
14 | import { WEBSERVER } from './constants' | 14 | import { WEBSERVER } from './constants' |
15 | 15 | ||
@@ -18,8 +18,8 @@ async function checkActivityPubUrls () { | |||
18 | 18 | ||
19 | const parsed = new URL(actor.url) | 19 | const parsed = new URL(actor.url) |
20 | if (WEBSERVER.HOST !== parsed.host) { | 20 | if (WEBSERVER.HOST !== parsed.host) { |
21 | const NODE_ENV = util.getEnv('NODE_ENV') | 21 | const NODE_ENV = config.util.getEnv('NODE_ENV') |
22 | const NODE_CONFIG_DIR = util.getEnv('NODE_CONFIG_DIR') | 22 | const NODE_CONFIG_DIR = config.util.getEnv('NODE_CONFIG_DIR') |
23 | 23 | ||
24 | logger.warn( | 24 | logger.warn( |
25 | 'It seems PeerTube was started (and created some data) with another domain name. ' + | 25 | 'It seems PeerTube was started (and created some data) with another domain name. ' + |
@@ -36,7 +36,7 @@ async function checkActivityPubUrls () { | |||
36 | function checkConfig () { | 36 | function checkConfig () { |
37 | 37 | ||
38 | // Moved configuration keys | 38 | // Moved configuration keys |
39 | if (has('services.csp-logger')) { | 39 | if (config.has('services.csp-logger')) { |
40 | logger.warn('services.csp-logger configuration has been renamed to csp.report_uri. Please update your configuration file.') | 40 | logger.warn('services.csp-logger configuration has been renamed to csp.report_uri. Please update your configuration file.') |
41 | } | 41 | } |
42 | 42 | ||
@@ -97,7 +97,7 @@ function checkConfig () { | |||
97 | 97 | ||
98 | // Check storage directory locations | 98 | // Check storage directory locations |
99 | if (isProdInstance()) { | 99 | if (isProdInstance()) { |
100 | const configStorage = get('storage') | 100 | const configStorage = config.get('storage') |
101 | for (const key of Object.keys(configStorage)) { | 101 | for (const key of Object.keys(configStorage)) { |
102 | if (configStorage[key].startsWith('storage/')) { | 102 | if (configStorage[key].startsWith('storage/')) { |
103 | logger.warn( | 103 | logger.warn( |