From 2f372a865487427ff97ad17edd0e6adfbb478c80 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Jul 2016 16:23:58 +0200 Subject: Server: implement refresh token --- server/models/user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models/user.js') 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) UserSchema.path('username').required(true) UserSchema.statics = { - list: list, - loadByUsernameAndPassword: loadByUsernameAndPassword + getByUsernameAndPassword: getByUsernameAndPassword, + list: list } mongoose.model('User', UserSchema) @@ -23,6 +23,6 @@ function list (callback) { return this.find(callback) } -function loadByUsernameAndPassword (username, password, callback) { - return this.findOne({ username: username, password: password }, callback) +function getByUsernameAndPassword (username, password) { + return this.findOne({ username: username, password: password }) } -- cgit v1.2.3