aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-02 12:19:02 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-02 12:19:02 +0200
commitc4403b29ad4db097af528a7f04eea07e0ed320d0 (patch)
treec7d84fe1c45b7aa35d49312a83f4e7cfdf6af909
parent9f6bae3a9db13bf827f8aaff903aac06ec430903 (diff)
downloadPeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.tar.gz
PeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.tar.zst
PeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.zip
Server: remove useless hash affectations
-rw-r--r--server/helpers/custom-validators/misc.js4
-rw-r--r--server/helpers/custom-validators/pods.js2
-rw-r--r--server/helpers/custom-validators/users.js6
-rw-r--r--server/helpers/custom-validators/videos.js22
-rw-r--r--server/helpers/peertube-crypto.js14
-rw-r--r--server/helpers/requests.js4
-rw-r--r--server/helpers/utils.js4
-rw-r--r--server/initializers/checker.js6
-rw-r--r--server/initializers/installer.js8
-rw-r--r--server/lib/friends.js14
-rw-r--r--server/lib/oauth-model.js12
-rw-r--r--server/middlewares/admin.js2
-rw-r--r--server/middlewares/oauth.js4
-rw-r--r--server/middlewares/pagination.js2
-rw-r--r--server/middlewares/pods.js4
-rw-r--r--server/middlewares/search.js2
-rw-r--r--server/middlewares/secure.js4
-rw-r--r--server/middlewares/sort.js4
-rw-r--r--server/middlewares/validators/pagination.js2
-rw-r--r--server/middlewares/validators/pods.js4
-rw-r--r--server/middlewares/validators/remote.js6
-rw-r--r--server/middlewares/validators/sort.js4
-rw-r--r--server/middlewares/validators/users.js6
-rw-r--r--server/middlewares/validators/utils.js2
-rw-r--r--server/middlewares/validators/videos.js8
-rw-r--r--server/models/application.js4
-rw-r--r--server/models/oauth-client.js6
-rw-r--r--server/models/oauth-token.js8
-rw-r--r--server/models/pods.js18
-rw-r--r--server/models/user.js16
-rw-r--r--server/models/utils.js2
-rw-r--r--server/models/video.js26
-rw-r--r--server/tests/utils/login.js4
-rw-r--r--server/tests/utils/miscs.js2
-rw-r--r--server/tests/utils/pods.js6
-rw-r--r--server/tests/utils/requests.js6
-rw-r--r--server/tests/utils/servers.js6
-rw-r--r--server/tests/utils/users.js12
-rw-r--r--server/tests/utils/videos.js22
39 files changed, 144 insertions, 144 deletions
diff --git a/server/helpers/custom-validators/misc.js b/server/helpers/custom-validators/misc.js
index 782ae3dee..052726241 100644
--- a/server/helpers/custom-validators/misc.js
+++ b/server/helpers/custom-validators/misc.js
@@ -1,8 +1,8 @@
1'use strict' 1'use strict'
2 2
3const miscValidators = { 3const miscValidators = {
4 exists: exists, 4 exists,
5 isArray: isArray 5 isArray
6} 6}
7 7
8function exists (value) { 8function exists (value) {
diff --git a/server/helpers/custom-validators/pods.js b/server/helpers/custom-validators/pods.js
index 28d04a05d..40f8b5d0b 100644
--- a/server/helpers/custom-validators/pods.js
+++ b/server/helpers/custom-validators/pods.js
@@ -5,7 +5,7 @@ const validator = require('express-validator').validator
5const miscValidators = require('./misc') 5const miscValidators = require('./misc')
6 6
7const podsValidators = { 7const podsValidators = {
8 isEachUniqueUrlValid: isEachUniqueUrlValid 8 isEachUniqueUrlValid
9} 9}
10 10
11function isEachUniqueUrlValid (urls) { 11function isEachUniqueUrlValid (urls) {
diff --git a/server/helpers/custom-validators/users.js b/server/helpers/custom-validators/users.js
index 0e92989e5..88fa1592e 100644
--- a/server/helpers/custom-validators/users.js
+++ b/server/helpers/custom-validators/users.js
@@ -7,9 +7,9 @@ const constants = require('../../initializers/constants')
7const USERS_CONSTRAINTS_FIELDS = constants.CONSTRAINTS_FIELDS.USERS 7const USERS_CONSTRAINTS_FIELDS = constants.CONSTRAINTS_FIELDS.USERS
8 8
9const usersValidators = { 9const usersValidators = {
10 isUserPasswordValid: isUserPasswordValid, 10 isUserPasswordValid,
11 isUserRoleValid: isUserRoleValid, 11 isUserRoleValid,
12 isUserUsernameValid: isUserUsernameValid 12 isUserUsernameValid
13} 13}
14 14
15function isUserPasswordValid (value) { 15function isUserPasswordValid (value) {
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js
index ebe927208..a507ff686 100644
--- a/server/helpers/custom-validators/videos.js
+++ b/server/helpers/custom-validators/videos.js
@@ -8,17 +8,17 @@ const miscValidators = require('./misc')
8const VIDEOS_CONSTRAINTS_FIELDS = constants.CONSTRAINTS_FIELDS.VIDEOS 8const VIDEOS_CONSTRAINTS_FIELDS = constants.CONSTRAINTS_FIELDS.VIDEOS
9 9
10const videosValidators = { 10const videosValidators = {
11 isEachRemoteVideosValid: isEachRemoteVideosValid, 11 isEachRemoteVideosValid,
12 isVideoAuthorValid: isVideoAuthorValid, 12 isVideoAuthorValid,
13 isVideoDateValid: isVideoDateValid, 13 isVideoDateValid,
14 isVideoDescriptionValid: isVideoDescriptionValid, 14 isVideoDescriptionValid,
15 isVideoDurationValid: isVideoDurationValid, 15 isVideoDurationValid,
16 isVideoMagnetUriValid: isVideoMagnetUriValid, 16 isVideoMagnetUriValid,
17 isVideoNameValid: isVideoNameValid, 17 isVideoNameValid,
18 isVideoPodUrlValid: isVideoPodUrlValid, 18 isVideoPodUrlValid,
19 isVideoTagsValid: isVideoTagsValid, 19 isVideoTagsValid,
20 isVideoThumbnailValid: isVideoThumbnailValid, 20 isVideoThumbnailValid,
21 isVideoThumbnail64Valid: isVideoThumbnail64Valid 21 isVideoThumbnail64Valid
22} 22}
23 23
24function isEachRemoteVideosValid (requests) { 24function isEachRemoteVideosValid (requests) {
diff --git a/server/helpers/peertube-crypto.js b/server/helpers/peertube-crypto.js
index 4783e9965..1ff638b04 100644
--- a/server/helpers/peertube-crypto.js
+++ b/server/helpers/peertube-crypto.js
@@ -12,13 +12,13 @@ const logger = require('./logger')
12const algorithm = 'aes-256-ctr' 12const algorithm = 'aes-256-ctr'
13 13
14const peertubeCrypto = { 14const peertubeCrypto = {
15 checkSignature: checkSignature, 15 checkSignature,
16 comparePassword: comparePassword, 16 comparePassword,
17 createCertsIfNotExist: createCertsIfNotExist, 17 createCertsIfNotExist,
18 cryptPassword: cryptPassword, 18 cryptPassword,
19 decrypt: decrypt, 19 decrypt,
20 encrypt: encrypt, 20 encrypt,
21 sign: sign 21 sign
22} 22}
23 23
24function checkSignature (publicKey, rawData, hexSignature) { 24function checkSignature (publicKey, rawData, hexSignature) {
diff --git a/server/helpers/requests.js b/server/helpers/requests.js
index f76ff3473..95775c981 100644
--- a/server/helpers/requests.js
+++ b/server/helpers/requests.js
@@ -7,8 +7,8 @@ const constants = require('../initializers/constants')
7const peertubeCrypto = require('./peertube-crypto') 7const peertubeCrypto = require('./peertube-crypto')
8 8
9const requests = { 9const requests = {
10 makeRetryRequest: makeRetryRequest, 10 makeRetryRequest,
11 makeSecureRequest: makeSecureRequest 11 makeSecureRequest
12} 12}
13 13
14function makeRetryRequest (params, callback) { 14function makeRetryRequest (params, callback) {
diff --git a/server/helpers/utils.js b/server/helpers/utils.js
index a77116e08..9c2d402e3 100644
--- a/server/helpers/utils.js
+++ b/server/helpers/utils.js
@@ -5,8 +5,8 @@ const crypto = require('crypto')
5const logger = require('./logger') 5const logger = require('./logger')
6 6
7const utils = { 7const utils = {
8 cleanForExit: cleanForExit, 8 cleanForExit,
9 generateRandomString: generateRandomString 9 generateRandomString
10} 10}
11 11
12function generateRandomString (size, callback) { 12function generateRandomString (size, callback) {
diff --git a/server/initializers/checker.js b/server/initializers/checker.js
index 2a33009b4..91fbcfaf9 100644
--- a/server/initializers/checker.js
+++ b/server/initializers/checker.js
@@ -7,9 +7,9 @@ const Client = mongoose.model('OAuthClient')
7const User = mongoose.model('User') 7const User = mongoose.model('User')
8 8
9const checker = { 9const checker = {
10 checkConfig: checkConfig, 10 checkConfig,
11 clientsExist: clientsExist, 11 clientsExist,
12 usersExist: usersExist 12 usersExist
13} 13}
14 14
15// Check the config files 15// Check the config files
diff --git a/server/initializers/installer.js b/server/initializers/installer.js
index 8c3148e79..1df300ba8 100644
--- a/server/initializers/installer.js
+++ b/server/initializers/installer.js
@@ -18,7 +18,7 @@ const Client = mongoose.model('OAuthClient')
18const User = mongoose.model('User') 18const User = mongoose.model('User')
19 19
20const installer = { 20const installer = {
21 installApplication: installApplication 21 installApplication
22} 22}
23 23
24function installApplication (callback) { 24function installApplication (callback) {
@@ -107,9 +107,9 @@ function createOAuthAdminIfNotExist (callback) {
107 } 107 }
108 108
109 const user = new User({ 109 const user = new User({
110 username: username, 110 username,
111 password: password, 111 password,
112 role: role 112 role
113 }) 113 })
114 114
115 user.save(function (err, createdUser) { 115 user.save(function (err, createdUser) {
diff --git a/server/lib/friends.js b/server/lib/friends.js
index 6c4383d8e..556d2e773 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -17,13 +17,13 @@ const Request = mongoose.model('Request')
17const Video = mongoose.model('Video') 17const Video = mongoose.model('Video')
18 18
19const friends = { 19const friends = {
20 addVideoToFriends: addVideoToFriends, 20 addVideoToFriends,
21 hasFriends: hasFriends, 21 hasFriends,
22 getMyCertificate: getMyCertificate, 22 getMyCertificate,
23 makeFriends: makeFriends, 23 makeFriends,
24 quitFriends: quitFriends, 24 quitFriends,
25 removeVideoToFriends: removeVideoToFriends, 25 removeVideoToFriends,
26 sendOwnedVideosToPod: sendOwnedVideosToPod 26 sendOwnedVideosToPod
27} 27}
28 28
29function addVideoToFriends (video) { 29function addVideoToFriends (video) {
diff --git a/server/lib/oauth-model.js b/server/lib/oauth-model.js
index 6dab02fca..45f796796 100644
--- a/server/lib/oauth-model.js
+++ b/server/lib/oauth-model.js
@@ -8,12 +8,12 @@ const User = mongoose.model('User')
8 8
9// See https://github.com/oauthjs/node-oauth2-server/wiki/Model-specification for the model specifications 9// See https://github.com/oauthjs/node-oauth2-server/wiki/Model-specification for the model specifications
10const OAuthModel = { 10const OAuthModel = {
11 getAccessToken: getAccessToken, 11 getAccessToken,
12 getClient: getClient, 12 getClient,
13 getRefreshToken: getRefreshToken, 13 getRefreshToken,
14 getUser: getUser, 14 getUser,
15 revokeToken: revokeToken, 15 revokeToken,
16 saveToken: saveToken 16 saveToken
17} 17}
18 18
19// --------------------------------------------------------------------------- 19// ---------------------------------------------------------------------------
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')
4const logger = require('../helpers/logger') 4const logger = require('../helpers/logger')
5 5
6const adminMiddleware = { 6const adminMiddleware = {
7 ensureIsAdmin: ensureIsAdmin 7 ensureIsAdmin
8} 8}
9 9
10function ensureIsAdmin (req, res, next) { 10function 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
14const oAuth = { 14const oAuth = {
15 authenticate: authenticate, 15 authenticate,
16 token: token 16 token
17} 17}
18 18
19function authenticate (req, res, next) { 19function 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 @@
3const constants = require('../initializers/constants') 3const constants = require('../initializers/constants')
4 4
5const paginationMiddleware = { 5const paginationMiddleware = {
6 setPagination: setPagination 6 setPagination
7} 7}
8 8
9function setPagination (req, res, next) { 9function 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')
5const logger = require('../helpers/logger') 5const logger = require('../helpers/logger')
6 6
7const podsMiddleware = { 7const podsMiddleware = {
8 setBodyUrlsPort: setBodyUrlsPort, 8 setBodyUrlsPort,
9 setBodyUrlPort: setBodyUrlPort 9 setBodyUrlPort
10} 10}
11 11
12function setBodyUrlsPort (req, res, next) { 12function 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
3const searchMiddleware = { 3const searchMiddleware = {
4 setVideosSearch: setVideosSearch 4 setVideosSearch
5} 5}
6 6
7function setVideosSearch (req, res, next) { 7function 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')
7const Pod = mongoose.model('Pod') 7const Pod = mongoose.model('Pod')
8 8
9const secureMiddleware = { 9const secureMiddleware = {
10 checkSignature: checkSignature, 10 checkSignature,
11 decryptBody: decryptBody 11 decryptBody
12} 12}
13 13
14function checkSignature (req, res, next) { 14function 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
3const sortMiddleware = { 3const sortMiddleware = {
4 setUsersSort: setUsersSort, 4 setUsersSort,
5 setVideosSort: setVideosSort 5 setVideosSort
6} 6}
7 7
8function setUsersSort (req, res, next) { 8function 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
4const logger = require('../../helpers/logger') 4const logger = require('../../helpers/logger')
5 5
6const validatorsPagination = { 6const validatorsPagination = {
7 pagination: pagination 7 pagination
8} 8}
9 9
10function pagination (req, res, next) { 10function 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')
5const logger = require('../../helpers/logger') 5const logger = require('../../helpers/logger')
6 6
7const validatorsPod = { 7const validatorsPod = {
8 makeFriends: makeFriends, 8 makeFriends,
9 podsAdd: podsAdd 9 podsAdd
10} 10}
11 11
12function makeFriends (req, res, next) { 12function 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
4const logger = require('../../helpers/logger') 4const logger = require('../../helpers/logger')
5 5
6const validatorsRemote = { 6const validatorsRemote = {
7 dataToDecrypt: dataToDecrypt, 7 dataToDecrypt,
8 remoteVideos: remoteVideos, 8 remoteVideos,
9 signature: signature 9 signature
10} 10}
11 11
12function dataToDecrypt (req, res, next) { 12function 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')
5const logger = require('../../helpers/logger') 5const logger = require('../../helpers/logger')
6 6
7const validatorsSort = { 7const validatorsSort = {
8 usersSort: usersSort, 8 usersSort,
9 videosSort: videosSort 9 videosSort
10} 10}
11 11
12function usersSort (req, res, next) { 12function 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')
8const User = mongoose.model('User') 8const User = mongoose.model('User')
9 9
10const validatorsUsers = { 10const validatorsUsers = {
11 usersAdd: usersAdd, 11 usersAdd,
12 usersRemove: usersRemove, 12 usersRemove,
13 usersUpdate: usersUpdate 13 usersUpdate
14} 14}
15 15
16function usersAdd (req, res, next) { 16function 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')
5const logger = require('../../helpers/logger') 5const logger = require('../../helpers/logger')
6 6
7const validatorsUtils = { 7const validatorsUtils = {
8 checkErrors: checkErrors 8 checkErrors
9} 9}
10 10
11function checkErrors (req, res, next, statusCode) { 11function 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')
10const Video = mongoose.model('Video') 10const Video = mongoose.model('Video')
11 11
12const validatorsVideos = { 12const 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
19function videosAdd (req, res, next) { 19function videosAdd (req, res, next) {
diff --git a/server/models/application.js b/server/models/application.js
index 8185f0915..452ac4283 100644
--- a/server/models/application.js
+++ b/server/models/application.js
@@ -10,8 +10,8 @@ const ApplicationSchema = mongoose.Schema({
10}) 10})
11 11
12ApplicationSchema.statics = { 12ApplicationSchema.statics = {
13 loadMongoSchemaVersion: loadMongoSchemaVersion, 13 loadMongoSchemaVersion,
14 updateMongoSchemaVersion: updateMongoSchemaVersion 14 updateMongoSchemaVersion
15} 15}
16 16
17mongoose.model('Application', ApplicationSchema) 17mongoose.model('Application', ApplicationSchema)
diff --git a/server/models/oauth-client.js b/server/models/oauth-client.js
index 45834c5a5..a1aefa985 100644
--- a/server/models/oauth-client.js
+++ b/server/models/oauth-client.js
@@ -11,9 +11,9 @@ const OAuthClientSchema = mongoose.Schema({
11OAuthClientSchema.path('clientSecret').required(true) 11OAuthClientSchema.path('clientSecret').required(true)
12 12
13OAuthClientSchema.statics = { 13OAuthClientSchema.statics = {
14 getByIdAndSecret: getByIdAndSecret, 14 getByIdAndSecret,
15 list: list, 15 list,
16 loadFirstClient: loadFirstClient 16 loadFirstClient
17} 17}
18 18
19mongoose.model('OAuthClient', OAuthClientSchema) 19mongoose.model('OAuthClient', OAuthClientSchema)
diff --git a/server/models/oauth-token.js b/server/models/oauth-token.js
index d53fdcf31..5beb47bed 100644
--- a/server/models/oauth-token.js
+++ b/server/models/oauth-token.js
@@ -18,10 +18,10 @@ OAuthTokenSchema.path('client').required(true)
18OAuthTokenSchema.path('user').required(true) 18OAuthTokenSchema.path('user').required(true)
19 19
20OAuthTokenSchema.statics = { 20OAuthTokenSchema.statics = {
21 getByRefreshTokenAndPopulateClient: getByRefreshTokenAndPopulateClient, 21 getByRefreshTokenAndPopulateClient,
22 getByTokenAndPopulateUser: getByTokenAndPopulateUser, 22 getByTokenAndPopulateUser,
23 getByRefreshToken: getByRefreshToken, 23 getByRefreshToken,
24 removeByUserId: removeByUserId 24 removeByUserId
25} 25}
26 26
27mongoose.model('OAuthToken', OAuthTokenSchema) 27mongoose.model('OAuthToken', OAuthTokenSchema)
diff --git a/server/models/pods.js b/server/models/pods.js
index 59de2d60c..4020a9603 100644
--- a/server/models/pods.js
+++ b/server/models/pods.js
@@ -24,18 +24,18 @@ PodSchema.path('publicKey').required(true)
24PodSchema.path('score').validate(function (value) { return !isNaN(value) }) 24PodSchema.path('score').validate(function (value) { return !isNaN(value) })
25 25
26PodSchema.methods = { 26PodSchema.methods = {
27 toFormatedJSON: toFormatedJSON 27 toFormatedJSON
28} 28}
29 29
30PodSchema.statics = { 30PodSchema.statics = {
31 countAll: countAll, 31 countAll,
32 incrementScores: incrementScores, 32 incrementScores,
33 list: list, 33 list,
34 listAllIds: listAllIds, 34 listAllIds,
35 listBadPods: listBadPods, 35 listBadPods,
36 load: load, 36 load,
37 loadByUrl: loadByUrl, 37 loadByUrl,
38 removeAll: removeAll 38 removeAll
39} 39}
40 40
41PodSchema.pre('save', function (next) { 41PodSchema.pre('save', function (next) {
diff --git a/server/models/user.js b/server/models/user.js
index 91e8aeae1..a19de7072 100644
--- a/server/models/user.js
+++ b/server/models/user.js
@@ -23,17 +23,17 @@ UserSchema.path('username').required(customUsersValidators.isUserUsernameValid)
23UserSchema.path('role').validate(customUsersValidators.isUserRoleValid) 23UserSchema.path('role').validate(customUsersValidators.isUserRoleValid)
24 24
25UserSchema.methods = { 25UserSchema.methods = {
26 isPasswordMatch: isPasswordMatch, 26 isPasswordMatch,
27 toFormatedJSON: toFormatedJSON 27 toFormatedJSON
28} 28}
29 29
30UserSchema.statics = { 30UserSchema.statics = {
31 countTotal: countTotal, 31 countTotal,
32 getByUsername: getByUsername, 32 getByUsername,
33 list: list, 33 list,
34 listForApi: listForApi, 34 listForApi,
35 loadById: loadById, 35 loadById,
36 loadByUsername: loadByUsername 36 loadByUsername
37} 37}
38 38
39UserSchema.pre('save', function (next) { 39UserSchema.pre('save', function (next) {
diff --git a/server/models/utils.js b/server/models/utils.js
index a961e8c5b..e798aabe6 100644
--- a/server/models/utils.js
+++ b/server/models/utils.js
@@ -3,7 +3,7 @@
3const parallel = require('async/parallel') 3const parallel = require('async/parallel')
4 4
5const utils = { 5const utils = {
6 listForApiWithCount: listForApiWithCount 6 listForApiWithCount
7} 7}
8 8
9function listForApiWithCount (query, start, count, sort, callback) { 9function listForApiWithCount (query, start, count, sort, callback) {
diff --git a/server/models/video.js b/server/models/video.js
index 0f60b6cd4..b9999c8f6 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -47,22 +47,22 @@ VideoSchema.path('thumbnail').validate(function (value) {
47VideoSchema.path('tags').validate(customVideosValidators.isVideoTagsValid) 47VideoSchema.path('tags').validate(customVideosValidators.isVideoTagsValid)
48 48
49VideoSchema.methods = { 49VideoSchema.methods = {
50 isOwned: isOwned, 50 isOwned,
51 toFormatedJSON: toFormatedJSON, 51 toFormatedJSON,
52 toRemoteJSON: toRemoteJSON 52 toRemoteJSON
53} 53}
54 54
55VideoSchema.statics = { 55VideoSchema.statics = {
56 getDurationFromFile: getDurationFromFile, 56 getDurationFromFile,
57 listForApi: listForApi, 57 listForApi,
58 listByUrlAndMagnet: listByUrlAndMagnet, 58 listByUrlAndMagnet,
59 listByUrls: listByUrls, 59 listByUrls,
60 listOwned: listOwned, 60 listOwned,
61 listOwnedByAuthor: listOwnedByAuthor, 61 listOwnedByAuthor,
62 listRemotes: listRemotes, 62 listRemotes,
63 load: load, 63 load,
64 search: search, 64 search,
65 seedAllExisting: seedAllExisting 65 seedAllExisting
66} 66}
67 67
68VideoSchema.pre('remove', function (next) { 68VideoSchema.pre('remove', function (next) {
diff --git a/server/tests/utils/login.js b/server/tests/utils/login.js
index 1a5d75bc4..465564e14 100644
--- a/server/tests/utils/login.js
+++ b/server/tests/utils/login.js
@@ -3,8 +3,8 @@
3const request = require('supertest') 3const request = require('supertest')
4 4
5const loginUtils = { 5const loginUtils = {
6 login: login, 6 login,
7 loginAndGetAccessToken: loginAndGetAccessToken 7 loginAndGetAccessToken
8} 8}
9 9
10// ---------------------- Export functions -------------------- 10// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/miscs.js b/server/tests/utils/miscs.js
index 5414cd561..4ceff65df 100644
--- a/server/tests/utils/miscs.js
+++ b/server/tests/utils/miscs.js
@@ -1,7 +1,7 @@
1'use strict' 1'use strict'
2 2
3const miscsUtils = { 3const miscsUtils = {
4 dateIsValid: dateIsValid 4 dateIsValid
5} 5}
6 6
7// ---------------------- Export functions -------------------- 7// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/pods.js b/server/tests/utils/pods.js
index 9a9148856..a8551a49d 100644
--- a/server/tests/utils/pods.js
+++ b/server/tests/utils/pods.js
@@ -3,9 +3,9 @@
3const request = require('supertest') 3const request = require('supertest')
4 4
5const podsUtils = { 5const podsUtils = {
6 getFriendsList: getFriendsList, 6 getFriendsList,
7 makeFriends: makeFriends, 7 makeFriends,
8 quitFriends: quitFriends 8 quitFriends
9} 9}
10 10
11// ---------------------- Export functions -------------------- 11// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/requests.js b/server/tests/utils/requests.js
index 410e42c77..b1470814d 100644
--- a/server/tests/utils/requests.js
+++ b/server/tests/utils/requests.js
@@ -3,9 +3,9 @@
3const request = require('supertest') 3const request = require('supertest')
4 4
5const requestsUtils = { 5const requestsUtils = {
6 makePostUploadRequest: makePostUploadRequest, 6 makePostUploadRequest,
7 makePostBodyRequest: makePostBodyRequest, 7 makePostBodyRequest,
8 makePutBodyRequest: makePutBodyRequest 8 makePutBodyRequest
9} 9}
10 10
11// ---------------------- Export functions -------------------- 11// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/servers.js b/server/tests/utils/servers.js
index ee7cd8c0a..d62838bc7 100644
--- a/server/tests/utils/servers.js
+++ b/server/tests/utils/servers.js
@@ -6,9 +6,9 @@ const fork = childProcess.fork
6const pathUtils = require('path') 6const pathUtils = require('path')
7 7
8const serversUtils = { 8const serversUtils = {
9 flushAndRunMultipleServers: flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
10 flushTests: flushTests, 10 flushTests,
11 runServer: runServer 11 runServer
12} 12}
13 13
14// ---------------------- Export functions -------------------- 14// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/users.js b/server/tests/utils/users.js
index 0cf4e4adb..2bf9c6e3e 100644
--- a/server/tests/utils/users.js
+++ b/server/tests/utils/users.js
@@ -3,12 +3,12 @@
3const request = require('supertest') 3const request = require('supertest')
4 4
5const usersUtils = { 5const usersUtils = {
6 createUser: createUser, 6 createUser,
7 getUserInformation: getUserInformation, 7 getUserInformation,
8 getUsersList: getUsersList, 8 getUsersList,
9 getUsersListPaginationAndSort: getUsersListPaginationAndSort, 9 getUsersListPaginationAndSort,
10 removeUser: removeUser, 10 removeUser,
11 updateUser: updateUser 11 updateUser
12} 12}
13 13
14// ---------------------- Export functions -------------------- 14// ---------------------- Export functions --------------------
diff --git a/server/tests/utils/videos.js b/server/tests/utils/videos.js
index 90ee9621e..536093db1 100644
--- a/server/tests/utils/videos.js
+++ b/server/tests/utils/videos.js
@@ -5,17 +5,17 @@ const pathUtils = require('path')
5const request = require('supertest') 5const request = require('supertest')
6 6
7const videosUtils = { 7const videosUtils = {
8 getAllVideosListBy: getAllVideosListBy, 8 getAllVideosListBy,
9 getVideo: getVideo, 9 getVideo,
10 getVideosList: getVideosList, 10 getVideosList,
11 getVideosListPagination: getVideosListPagination, 11 getVideosListPagination,
12 getVideosListSort: getVideosListSort, 12 getVideosListSort,
13 removeVideo: removeVideo, 13 removeVideo,
14 searchVideo: searchVideo, 14 searchVideo,
15 searchVideoWithPagination: searchVideoWithPagination, 15 searchVideoWithPagination,
16 searchVideoWithSort: searchVideoWithSort, 16 searchVideoWithSort,
17 testVideoImage: testVideoImage, 17 testVideoImage,
18 uploadVideo: uploadVideo 18 uploadVideo
19} 19}
20 20
21// ---------------------- Export functions -------------------- 21// ---------------------- Export functions --------------------