diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-11 17:04:57 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-11 17:05:55 +0200 |
commit | 075f16caac5236cb04c98ae7b3a989766d764bb3 (patch) | |
tree | 9a30024aa771735a28d83d9a166033b82dbcaf60 /server/lib/oauth-model.ts | |
parent | 4e979c3e1b81f4762025d9db3052b1f70774b3bb (diff) | |
download | PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.gz PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.zst PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.zip |
Remove "function" in favor of () => {}
Diffstat (limited to 'server/lib/oauth-model.ts')
-rw-r--r-- | server/lib/oauth-model.ts | 4 |
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) { | |||
27 | function getUser (username: string, password: string) { | 27 | function 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 | ||
41 | function revokeToken (token: TokenInfo) { | 41 | function 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 | /* |