diff options
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 | } |