aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/oauth-model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/oauth-model.ts')
-rw-r--r--server/lib/oauth-model.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts
index 2d7e56756..769ea126a 100644
--- a/server/lib/oauth-model.ts
+++ b/server/lib/oauth-model.ts
@@ -27,7 +27,7 @@ function getRefreshToken (refreshToken: string) {
27function getUser (username: string, password: string) { 27function getUser (username: string, password: string) {
28 logger.debug('Getting User (username: ' + username + ', password: ' + password + ').') 28 logger.debug('Getting User (username: ' + username + ', password: ' + password + ').')
29 29
30 return db.User.getByUsername(username).then(function (user) { 30 return db.User.getByUsername(username).then(user => {
31 if (!user) return null 31 if (!user) return null
32 32
33 return user.isPasswordMatch(password).then(passwordMatch => { 33 return user.isPasswordMatch(password).then(passwordMatch => {
@@ -39,7 +39,7 @@ function getUser (username: string, password: string) {
39} 39}
40 40
41function revokeToken (token: TokenInfo) { 41function revokeToken (token: TokenInfo) {
42 return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(function (tokenDB) { 42 return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(tokenDB => {
43 if (tokenDB) tokenDB.destroy() 43 if (tokenDB) tokenDB.destroy()
44 44
45 /* 45 /*