From c4403b29ad4db097af528a7f04eea07e0ed320d0 Mon Sep 17 00:00:00 2001 From: Chocobozzz <florian.bigard@gmail.com> Date: Sun, 2 Oct 2016 12:19:02 +0200 Subject: Server: remove useless hash affectations --- server/models/application.js | 4 ++-- server/models/oauth-client.js | 6 +++--- server/models/oauth-token.js | 8 ++++---- server/models/pods.js | 18 +++++++++--------- server/models/user.js | 16 ++++++++-------- server/models/utils.js | 2 +- server/models/video.js | 26 +++++++++++++------------- 7 files changed, 40 insertions(+), 40 deletions(-) (limited to 'server/models') 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({ }) ApplicationSchema.statics = { - loadMongoSchemaVersion: loadMongoSchemaVersion, - updateMongoSchemaVersion: updateMongoSchemaVersion + loadMongoSchemaVersion, + updateMongoSchemaVersion } mongoose.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({ OAuthClientSchema.path('clientSecret').required(true) OAuthClientSchema.statics = { - getByIdAndSecret: getByIdAndSecret, - list: list, - loadFirstClient: loadFirstClient + getByIdAndSecret, + list, + loadFirstClient } mongoose.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) OAuthTokenSchema.path('user').required(true) OAuthTokenSchema.statics = { - getByRefreshTokenAndPopulateClient: getByRefreshTokenAndPopulateClient, - getByTokenAndPopulateUser: getByTokenAndPopulateUser, - getByRefreshToken: getByRefreshToken, - removeByUserId: removeByUserId + getByRefreshTokenAndPopulateClient, + getByTokenAndPopulateUser, + getByRefreshToken, + removeByUserId } mongoose.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) PodSchema.path('score').validate(function (value) { return !isNaN(value) }) PodSchema.methods = { - toFormatedJSON: toFormatedJSON + toFormatedJSON } PodSchema.statics = { - countAll: countAll, - incrementScores: incrementScores, - list: list, - listAllIds: listAllIds, - listBadPods: listBadPods, - load: load, - loadByUrl: loadByUrl, - removeAll: removeAll + countAll, + incrementScores, + list, + listAllIds, + listBadPods, + load, + loadByUrl, + removeAll } PodSchema.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) UserSchema.path('role').validate(customUsersValidators.isUserRoleValid) UserSchema.methods = { - isPasswordMatch: isPasswordMatch, - toFormatedJSON: toFormatedJSON + isPasswordMatch, + toFormatedJSON } UserSchema.statics = { - countTotal: countTotal, - getByUsername: getByUsername, - list: list, - listForApi: listForApi, - loadById: loadById, - loadByUsername: loadByUsername + countTotal, + getByUsername, + list, + listForApi, + loadById, + loadByUsername } UserSchema.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 @@ const parallel = require('async/parallel') const utils = { - listForApiWithCount: listForApiWithCount + listForApiWithCount } function 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) { VideoSchema.path('tags').validate(customVideosValidators.isVideoTagsValid) VideoSchema.methods = { - isOwned: isOwned, - toFormatedJSON: toFormatedJSON, - toRemoteJSON: toRemoteJSON + isOwned, + toFormatedJSON, + toRemoteJSON } VideoSchema.statics = { - getDurationFromFile: getDurationFromFile, - listForApi: listForApi, - listByUrlAndMagnet: listByUrlAndMagnet, - listByUrls: listByUrls, - listOwned: listOwned, - listOwnedByAuthor: listOwnedByAuthor, - listRemotes: listRemotes, - load: load, - search: search, - seedAllExisting: seedAllExisting + getDurationFromFile, + listForApi, + listByUrlAndMagnet, + listByUrls, + listOwned, + listOwnedByAuthor, + listRemotes, + load, + search, + seedAllExisting } VideoSchema.pre('remove', function (next) { -- cgit v1.2.3