aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
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 /server/models
parent9f6bae3a9db13bf827f8aaff903aac06ec430903 (diff)
downloadPeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.tar.gz
PeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.tar.zst
PeerTube-c4403b29ad4db097af528a7f04eea07e0ed320d0.zip
Server: remove useless hash affectations
Diffstat (limited to 'server/models')
-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
7 files changed, 40 insertions, 40 deletions
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) {