diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-20 16:23:58 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-20 16:23:58 +0200 |
commit | 2f372a865487427ff97ad17edd0e6adfbb478c80 (patch) | |
tree | 84e8b2ba2240e83dcdeeb057579327b0a663974b /server/models/user.js | |
parent | 66698b833f77806045b36fdeba612acda43dd7f7 (diff) | |
download | PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.gz PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.zst PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.zip |
Server: implement refresh token
Diffstat (limited to 'server/models/user.js')
-rw-r--r-- | server/models/user.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/user.js b/server/models/user.js index 130b49b55..14ffecbff 100644 --- a/server/models/user.js +++ b/server/models/user.js | |||
@@ -11,8 +11,8 @@ UserSchema.path('password').required(true) | |||
11 | UserSchema.path('username').required(true) | 11 | UserSchema.path('username').required(true) |
12 | 12 | ||
13 | UserSchema.statics = { | 13 | UserSchema.statics = { |
14 | list: list, | 14 | getByUsernameAndPassword: getByUsernameAndPassword, |
15 | loadByUsernameAndPassword: loadByUsernameAndPassword | 15 | list: list |
16 | } | 16 | } |
17 | 17 | ||
18 | mongoose.model('User', UserSchema) | 18 | mongoose.model('User', UserSchema) |
@@ -23,6 +23,6 @@ function list (callback) { | |||
23 | return this.find(callback) | 23 | return this.find(callback) |
24 | } | 24 | } |
25 | 25 | ||
26 | function loadByUsernameAndPassword (username, password, callback) { | 26 | function getByUsernameAndPassword (username, password) { |
27 | return this.findOne({ username: username, password: password }, callback) | 27 | return this.findOne({ username: username, password: password }) |
28 | } | 28 | } |