diff options
Diffstat (limited to 'server/initializers/config.ts')
-rw-r--r-- | server/initializers/config.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 7fd77f3e8..75372fa4e 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { IConfig } from 'config' | 1 | import { IConfig } from 'config' |
2 | import { dirname, join } from 'path' | 2 | import { dirname, join } from 'path' |
3 | import { VideosRedundancy } from '../../shared/models' | 3 | import { VideosRedundancyStrategy } from '../../shared/models' |
4 | // Do not use barrels, remain constants as independent as possible | 4 | // Do not use barrels, remain constants as independent as possible |
5 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' | 5 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' |
6 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' | 6 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' |
@@ -301,10 +301,10 @@ function getLocalConfigFilePath () { | |||
301 | if (process.env.NODE_ENV) filename += `-${process.env.NODE_ENV}` | 301 | if (process.env.NODE_ENV) filename += `-${process.env.NODE_ENV}` |
302 | if (process.env.NODE_APP_INSTANCE) filename += `-${process.env.NODE_APP_INSTANCE}` | 302 | if (process.env.NODE_APP_INSTANCE) filename += `-${process.env.NODE_APP_INSTANCE}` |
303 | 303 | ||
304 | return join(dirname(configSources[ 0 ].name), filename + '.json') | 304 | return join(dirname(configSources[0].name), filename + '.json') |
305 | } | 305 | } |
306 | 306 | ||
307 | function buildVideosRedundancy (objs: any[]): VideosRedundancy[] { | 307 | function buildVideosRedundancy (objs: any[]): VideosRedundancyStrategy[] { |
308 | if (!objs) return [] | 308 | if (!objs) return [] |
309 | 309 | ||
310 | if (!Array.isArray(objs)) return objs | 310 | if (!Array.isArray(objs)) return objs |
@@ -330,7 +330,7 @@ export function reloadConfig () { | |||
330 | 330 | ||
331 | function purge () { | 331 | function purge () { |
332 | for (const fileName in require.cache) { | 332 | for (const fileName in require.cache) { |
333 | if (-1 === fileName.indexOf(directory())) { | 333 | if (fileName.indexOf(directory()) === -1) { |
334 | continue | 334 | continue |
335 | } | 335 | } |
336 | 336 | ||