aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/reqValidators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/reqValidators')
-rw-r--r--server/middlewares/reqValidators/index.js8
-rw-r--r--server/middlewares/reqValidators/pods.js8
-rw-r--r--server/middlewares/reqValidators/remote.js6
-rw-r--r--server/middlewares/reqValidators/utils.js8
-rw-r--r--server/middlewares/reqValidators/videos.js10
5 files changed, 20 insertions, 20 deletions
diff --git a/server/middlewares/reqValidators/index.js b/server/middlewares/reqValidators/index.js
index 345dbd0e2..c6c5e1309 100644
--- a/server/middlewares/reqValidators/index.js
+++ b/server/middlewares/reqValidators/index.js
@@ -1,10 +1,10 @@
1'use strict' 1'use strict'
2 2
3var podsReqValidators = require('./pods') 3const podsReqValidators = require('./pods')
4var remoteReqValidators = require('./remote') 4const remoteReqValidators = require('./remote')
5var videosReqValidators = require('./videos') 5const videosReqValidators = require('./videos')
6 6
7var reqValidators = { 7const reqValidators = {
8 pods: podsReqValidators, 8 pods: podsReqValidators,
9 remote: remoteReqValidators, 9 remote: remoteReqValidators,
10 videos: videosReqValidators 10 videos: videosReqValidators
diff --git a/server/middlewares/reqValidators/pods.js b/server/middlewares/reqValidators/pods.js
index ef09d51cf..45e34c1ab 100644
--- a/server/middlewares/reqValidators/pods.js
+++ b/server/middlewares/reqValidators/pods.js
@@ -1,10 +1,10 @@
1'use strict' 1'use strict'
2 2
3var checkErrors = require('./utils').checkErrors 3const checkErrors = require('./utils').checkErrors
4var friends = require('../../lib/friends') 4const friends = require('../../lib/friends')
5var logger = require('../../helpers/logger') 5const logger = require('../../helpers/logger')
6 6
7var reqValidatorsPod = { 7const reqValidatorsPod = {
8 makeFriends: makeFriends, 8 makeFriends: makeFriends,
9 podsAdd: podsAdd 9 podsAdd: podsAdd
10} 10}
diff --git a/server/middlewares/reqValidators/remote.js b/server/middlewares/reqValidators/remote.js
index 88de16b49..3bc0e0f40 100644
--- a/server/middlewares/reqValidators/remote.js
+++ b/server/middlewares/reqValidators/remote.js
@@ -1,9 +1,9 @@
1'use strict' 1'use strict'
2 2
3var checkErrors = require('./utils').checkErrors 3const checkErrors = require('./utils').checkErrors
4var logger = require('../../helpers/logger') 4const logger = require('../../helpers/logger')
5 5
6var reqValidatorsRemote = { 6const reqValidatorsRemote = {
7 remoteVideosAdd: remoteVideosAdd, 7 remoteVideosAdd: remoteVideosAdd,
8 remoteVideosRemove: remoteVideosRemove, 8 remoteVideosRemove: remoteVideosRemove,
9 secureRequest: secureRequest 9 secureRequest: secureRequest
diff --git a/server/middlewares/reqValidators/utils.js b/server/middlewares/reqValidators/utils.js
index 46c982571..05675c445 100644
--- a/server/middlewares/reqValidators/utils.js
+++ b/server/middlewares/reqValidators/utils.js
@@ -1,16 +1,16 @@
1'use strict' 1'use strict'
2 2
3var util = require('util') 3const util = require('util')
4 4
5var logger = require('../../helpers/logger') 5const logger = require('../../helpers/logger')
6 6
7var reqValidatorsUtils = { 7const reqValidatorsUtils = {
8 checkErrors: checkErrors 8 checkErrors: checkErrors
9} 9}
10 10
11function checkErrors (req, res, next, status_code) { 11function checkErrors (req, res, next, status_code) {
12 if (status_code === undefined) status_code = 400 12 if (status_code === undefined) status_code = 400
13 var errors = req.validationErrors() 13 const errors = req.validationErrors()
14 14
15 if (errors) { 15 if (errors) {
16 logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors }) 16 logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors })
diff --git a/server/middlewares/reqValidators/videos.js b/server/middlewares/reqValidators/videos.js
index b0a6d0360..4057e72cd 100644
--- a/server/middlewares/reqValidators/videos.js
+++ b/server/middlewares/reqValidators/videos.js
@@ -1,11 +1,11 @@
1'use strict' 1'use strict'
2 2
3var checkErrors = require('./utils').checkErrors 3const checkErrors = require('./utils').checkErrors
4var logger = require('../../helpers/logger') 4const logger = require('../../helpers/logger')
5var videos = require('../../lib/videos') 5const videos = require('../../lib/videos')
6var Videos = require('../../models/videos') 6const Videos = require('../../models/videos')
7 7
8var reqValidatorsVideos = { 8const reqValidatorsVideos = {
9 videosAdd: videosAdd, 9 videosAdd: videosAdd,
10 videosGet: videosGet, 10 videosGet: videosGet,
11 videosRemove: videosRemove, 11 videosRemove: videosRemove,