diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/admin.js | 2 | ||||
-rw-r--r-- | server/middlewares/oauth.js | 4 | ||||
-rw-r--r-- | server/middlewares/pagination.js | 2 | ||||
-rw-r--r-- | server/middlewares/pods.js | 4 | ||||
-rw-r--r-- | server/middlewares/search.js | 2 | ||||
-rw-r--r-- | server/middlewares/secure.js | 4 | ||||
-rw-r--r-- | server/middlewares/sort.js | 4 | ||||
-rw-r--r-- | server/middlewares/validators/pagination.js | 2 | ||||
-rw-r--r-- | server/middlewares/validators/pods.js | 4 | ||||
-rw-r--r-- | server/middlewares/validators/remote.js | 6 | ||||
-rw-r--r-- | server/middlewares/validators/sort.js | 4 | ||||
-rw-r--r-- | server/middlewares/validators/users.js | 6 | ||||
-rw-r--r-- | server/middlewares/validators/utils.js | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos.js | 8 |
14 files changed, 27 insertions, 27 deletions
diff --git a/server/middlewares/admin.js b/server/middlewares/admin.js index bcb60ab95..e6d9dc887 100644 --- a/server/middlewares/admin.js +++ b/server/middlewares/admin.js | |||
@@ -4,7 +4,7 @@ const constants = require('../initializers/constants') | |||
4 | const logger = require('../helpers/logger') | 4 | const logger = require('../helpers/logger') |
5 | 5 | ||
6 | const adminMiddleware = { | 6 | const adminMiddleware = { |
7 | ensureIsAdmin: ensureIsAdmin | 7 | ensureIsAdmin |
8 | } | 8 | } |
9 | 9 | ||
10 | function ensureIsAdmin (req, res, next) { | 10 | function ensureIsAdmin (req, res, next) { |
diff --git a/server/middlewares/oauth.js b/server/middlewares/oauth.js index 08584c41c..3a02b9b48 100644 --- a/server/middlewares/oauth.js +++ b/server/middlewares/oauth.js | |||
@@ -12,8 +12,8 @@ const oAuthServer = new OAuthServer({ | |||
12 | }) | 12 | }) |
13 | 13 | ||
14 | const oAuth = { | 14 | const oAuth = { |
15 | authenticate: authenticate, | 15 | authenticate, |
16 | token: token | 16 | token |
17 | } | 17 | } |
18 | 18 | ||
19 | function authenticate (req, res, next) { | 19 | function authenticate (req, res, next) { |
diff --git a/server/middlewares/pagination.js b/server/middlewares/pagination.js index a571e51f6..a90f60aab 100644 --- a/server/middlewares/pagination.js +++ b/server/middlewares/pagination.js | |||
@@ -3,7 +3,7 @@ | |||
3 | const constants = require('../initializers/constants') | 3 | const constants = require('../initializers/constants') |
4 | 4 | ||
5 | const paginationMiddleware = { | 5 | const paginationMiddleware = { |
6 | setPagination: setPagination | 6 | setPagination |
7 | } | 7 | } |
8 | 8 | ||
9 | function setPagination (req, res, next) { | 9 | function setPagination (req, res, next) { |
diff --git a/server/middlewares/pods.js b/server/middlewares/pods.js index 116b02b3c..6e0874a76 100644 --- a/server/middlewares/pods.js +++ b/server/middlewares/pods.js | |||
@@ -5,8 +5,8 @@ const urlModule = require('url') | |||
5 | const logger = require('../helpers/logger') | 5 | const logger = require('../helpers/logger') |
6 | 6 | ||
7 | const podsMiddleware = { | 7 | const podsMiddleware = { |
8 | setBodyUrlsPort: setBodyUrlsPort, | 8 | setBodyUrlsPort, |
9 | setBodyUrlPort: setBodyUrlPort | 9 | setBodyUrlPort |
10 | } | 10 | } |
11 | 11 | ||
12 | function setBodyUrlsPort (req, res, next) { | 12 | function setBodyUrlsPort (req, res, next) { |
diff --git a/server/middlewares/search.js b/server/middlewares/search.js index 89302a564..bb88faf54 100644 --- a/server/middlewares/search.js +++ b/server/middlewares/search.js | |||
@@ -1,7 +1,7 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const searchMiddleware = { | 3 | const searchMiddleware = { |
4 | setVideosSearch: setVideosSearch | 4 | setVideosSearch |
5 | } | 5 | } |
6 | 6 | ||
7 | function setVideosSearch (req, res, next) { | 7 | function setVideosSearch (req, res, next) { |
diff --git a/server/middlewares/secure.js b/server/middlewares/secure.js index 33a52e8d9..58f824d14 100644 --- a/server/middlewares/secure.js +++ b/server/middlewares/secure.js | |||
@@ -7,8 +7,8 @@ const peertubeCrypto = require('../helpers/peertube-crypto') | |||
7 | const Pod = mongoose.model('Pod') | 7 | const Pod = mongoose.model('Pod') |
8 | 8 | ||
9 | const secureMiddleware = { | 9 | const secureMiddleware = { |
10 | checkSignature: checkSignature, | 10 | checkSignature, |
11 | decryptBody: decryptBody | 11 | decryptBody |
12 | } | 12 | } |
13 | 13 | ||
14 | function checkSignature (req, res, next) { | 14 | function checkSignature (req, res, next) { |
diff --git a/server/middlewares/sort.js b/server/middlewares/sort.js index 8ed157805..f0b7274eb 100644 --- a/server/middlewares/sort.js +++ b/server/middlewares/sort.js | |||
@@ -1,8 +1,8 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const sortMiddleware = { | 3 | const sortMiddleware = { |
4 | setUsersSort: setUsersSort, | 4 | setUsersSort, |
5 | setVideosSort: setVideosSort | 5 | setVideosSort |
6 | } | 6 | } |
7 | 7 | ||
8 | function setUsersSort (req, res, next) { | 8 | function setUsersSort (req, res, next) { |
diff --git a/server/middlewares/validators/pagination.js b/server/middlewares/validators/pagination.js index 8e9a01053..16682696e 100644 --- a/server/middlewares/validators/pagination.js +++ b/server/middlewares/validators/pagination.js | |||
@@ -4,7 +4,7 @@ const checkErrors = require('./utils').checkErrors | |||
4 | const logger = require('../../helpers/logger') | 4 | const logger = require('../../helpers/logger') |
5 | 5 | ||
6 | const validatorsPagination = { | 6 | const validatorsPagination = { |
7 | pagination: pagination | 7 | pagination |
8 | } | 8 | } |
9 | 9 | ||
10 | function pagination (req, res, next) { | 10 | function pagination (req, res, next) { |
diff --git a/server/middlewares/validators/pods.js b/server/middlewares/validators/pods.js index 3c605c45e..fd3d1e2f2 100644 --- a/server/middlewares/validators/pods.js +++ b/server/middlewares/validators/pods.js | |||
@@ -5,8 +5,8 @@ const friends = require('../../lib/friends') | |||
5 | const logger = require('../../helpers/logger') | 5 | const logger = require('../../helpers/logger') |
6 | 6 | ||
7 | const validatorsPod = { | 7 | const validatorsPod = { |
8 | makeFriends: makeFriends, | 8 | makeFriends, |
9 | podsAdd: podsAdd | 9 | podsAdd |
10 | } | 10 | } |
11 | 11 | ||
12 | function makeFriends (req, res, next) { | 12 | function makeFriends (req, res, next) { |
diff --git a/server/middlewares/validators/remote.js b/server/middlewares/validators/remote.js index 87dc524a2..8c29ef8ca 100644 --- a/server/middlewares/validators/remote.js +++ b/server/middlewares/validators/remote.js | |||
@@ -4,9 +4,9 @@ const checkErrors = require('./utils').checkErrors | |||
4 | const logger = require('../../helpers/logger') | 4 | const logger = require('../../helpers/logger') |
5 | 5 | ||
6 | const validatorsRemote = { | 6 | const validatorsRemote = { |
7 | dataToDecrypt: dataToDecrypt, | 7 | dataToDecrypt, |
8 | remoteVideos: remoteVideos, | 8 | remoteVideos, |
9 | signature: signature | 9 | signature |
10 | } | 10 | } |
11 | 11 | ||
12 | function dataToDecrypt (req, res, next) { | 12 | function dataToDecrypt (req, res, next) { |
diff --git a/server/middlewares/validators/sort.js b/server/middlewares/validators/sort.js index 37b34ef52..431d3fffd 100644 --- a/server/middlewares/validators/sort.js +++ b/server/middlewares/validators/sort.js | |||
@@ -5,8 +5,8 @@ const constants = require('../../initializers/constants') | |||
5 | const logger = require('../../helpers/logger') | 5 | const logger = require('../../helpers/logger') |
6 | 6 | ||
7 | const validatorsSort = { | 7 | const validatorsSort = { |
8 | usersSort: usersSort, | 8 | usersSort, |
9 | videosSort: videosSort | 9 | videosSort |
10 | } | 10 | } |
11 | 11 | ||
12 | function usersSort (req, res, next) { | 12 | function usersSort (req, res, next) { |
diff --git a/server/middlewares/validators/users.js b/server/middlewares/validators/users.js index 5defdf4e3..d541e9124 100644 --- a/server/middlewares/validators/users.js +++ b/server/middlewares/validators/users.js | |||
@@ -8,9 +8,9 @@ const logger = require('../../helpers/logger') | |||
8 | const User = mongoose.model('User') | 8 | const User = mongoose.model('User') |
9 | 9 | ||
10 | const validatorsUsers = { | 10 | const validatorsUsers = { |
11 | usersAdd: usersAdd, | 11 | usersAdd, |
12 | usersRemove: usersRemove, | 12 | usersRemove, |
13 | usersUpdate: usersUpdate | 13 | usersUpdate |
14 | } | 14 | } |
15 | 15 | ||
16 | function usersAdd (req, res, next) { | 16 | function usersAdd (req, res, next) { |
diff --git a/server/middlewares/validators/utils.js b/server/middlewares/validators/utils.js index f6e5b2b38..3741b84c6 100644 --- a/server/middlewares/validators/utils.js +++ b/server/middlewares/validators/utils.js | |||
@@ -5,7 +5,7 @@ const util = require('util') | |||
5 | const logger = require('../../helpers/logger') | 5 | const logger = require('../../helpers/logger') |
6 | 6 | ||
7 | const validatorsUtils = { | 7 | const validatorsUtils = { |
8 | checkErrors: checkErrors | 8 | checkErrors |
9 | } | 9 | } |
10 | 10 | ||
11 | function checkErrors (req, res, next, statusCode) { | 11 | function checkErrors (req, res, next, statusCode) { |
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js index e51087d5a..76e943e77 100644 --- a/server/middlewares/validators/videos.js +++ b/server/middlewares/validators/videos.js | |||
@@ -10,10 +10,10 @@ const logger = require('../../helpers/logger') | |||
10 | const Video = mongoose.model('Video') | 10 | const Video = mongoose.model('Video') |
11 | 11 | ||
12 | const validatorsVideos = { | 12 | const validatorsVideos = { |
13 | videosAdd: videosAdd, | 13 | videosAdd, |
14 | videosGet: videosGet, | 14 | videosGet, |
15 | videosRemove: videosRemove, | 15 | videosRemove, |
16 | videosSearch: videosSearch | 16 | videosSearch |
17 | } | 17 | } |
18 | 18 | ||
19 | function videosAdd (req, res, next) { | 19 | function videosAdd (req, res, next) { |