diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/oauth-token.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/oauth-token.js b/server/models/oauth-token.js index 5beb47bed..04fb9540d 100644 --- a/server/models/oauth-token.js +++ b/server/models/oauth-token.js | |||
@@ -20,7 +20,7 @@ OAuthTokenSchema.path('user').required(true) | |||
20 | OAuthTokenSchema.statics = { | 20 | OAuthTokenSchema.statics = { |
21 | getByRefreshTokenAndPopulateClient, | 21 | getByRefreshTokenAndPopulateClient, |
22 | getByTokenAndPopulateUser, | 22 | getByTokenAndPopulateUser, |
23 | getByRefreshToken, | 23 | getByRefreshTokenAndPopulateUser, |
24 | removeByUserId | 24 | removeByUserId |
25 | } | 25 | } |
26 | 26 | ||
@@ -51,8 +51,8 @@ function getByTokenAndPopulateUser (bearerToken) { | |||
51 | return this.findOne({ accessToken: bearerToken }).populate('user').exec() | 51 | return this.findOne({ accessToken: bearerToken }).populate('user').exec() |
52 | } | 52 | } |
53 | 53 | ||
54 | function getByRefreshToken (refreshToken) { | 54 | function getByRefreshTokenAndPopulateUser (refreshToken) { |
55 | return this.findOne({ refreshToken: refreshToken }).exec() | 55 | return this.findOne({ refreshToken: refreshToken }).populate('user').exec() |
56 | } | 56 | } |
57 | 57 | ||
58 | function removeByUserId (userId, callback) { | 58 | function removeByUserId (userId, callback) { |