aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-after-init.ts4
-rw-r--r--server/initializers/config.ts2
-rw-r--r--server/initializers/migrations/0080-video-channels.ts2
-rw-r--r--server/initializers/migrations/0345-video-playlists.ts2
4 files changed, 5 insertions, 5 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index e01609eef..bc4aae957 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -54,7 +54,7 @@ function checkConfig () {
54 const defaultNSFWPolicy = CONFIG.INSTANCE.DEFAULT_NSFW_POLICY 54 const defaultNSFWPolicy = CONFIG.INSTANCE.DEFAULT_NSFW_POLICY
55 { 55 {
56 const available = [ 'do_not_list', 'blur', 'display' ] 56 const available = [ 'do_not_list', 'blur', 'display' ]
57 if (available.indexOf(defaultNSFWPolicy) === -1) { 57 if (available.includes(defaultNSFWPolicy) === false) {
58 return 'NSFW policy setting should be ' + available.join(' or ') + ' instead of ' + defaultNSFWPolicy 58 return 'NSFW policy setting should be ' + available.join(' or ') + ' instead of ' + defaultNSFWPolicy
59 } 59 }
60 } 60 }
@@ -64,7 +64,7 @@ function checkConfig () {
64 if (isArray(redundancyVideos)) { 64 if (isArray(redundancyVideos)) {
65 const available = [ 'most-views', 'trending', 'recently-added' ] 65 const available = [ 'most-views', 'trending', 'recently-added' ]
66 for (const r of redundancyVideos) { 66 for (const r of redundancyVideos) {
67 if (available.indexOf(r.strategy) === -1) { 67 if (available.includes(r.strategy) === false) {
68 return 'Videos redundancy should have ' + available.join(' or ') + ' strategy instead of ' + r.strategy 68 return 'Videos redundancy should have ' + available.join(' or ') + ' strategy instead of ' + r.strategy
69 } 69 }
70 70
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 950ca61bd..3c07624e8 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -335,7 +335,7 @@ export function reloadConfig () {
335 335
336 function purge () { 336 function purge () {
337 for (const fileName in require.cache) { 337 for (const fileName in require.cache) {
338 if (fileName.indexOf(directory()) === -1) { 338 if (fileName.includes(directory()) === false) {
339 continue 339 continue
340 } 340 }
341 341
diff --git a/server/initializers/migrations/0080-video-channels.ts b/server/initializers/migrations/0080-video-channels.ts
index b8e9bd6d0..883224cb0 100644
--- a/server/initializers/migrations/0080-video-channels.ts
+++ b/server/initializers/migrations/0080-video-channels.ts
@@ -1,5 +1,5 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import * as uuidv4 from 'uuid/v4' 2import { v4 as uuidv4 } from 'uuid'
3 3
4async function up (utils: { 4async function up (utils: {
5 transaction: Sequelize.Transaction 5 transaction: Sequelize.Transaction
diff --git a/server/initializers/migrations/0345-video-playlists.ts b/server/initializers/migrations/0345-video-playlists.ts
index 76813f93f..89a14a6ee 100644
--- a/server/initializers/migrations/0345-video-playlists.ts
+++ b/server/initializers/migrations/0345-video-playlists.ts
@@ -1,6 +1,6 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { VideoPlaylistPrivacy, VideoPlaylistType } from '../../../shared/models/videos' 2import { VideoPlaylistPrivacy, VideoPlaylistType } from '../../../shared/models/videos'
3import * as uuidv4 from 'uuid/v4' 3import { v4 as uuidv4 } from 'uuid'
4import { WEBSERVER } from '../constants' 4import { WEBSERVER } from '../constants'
5 5
6async function up (utils: { 6async function up (utils: {