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.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts
index f34c9c667..2d7e56756 100644
--- a/server/lib/oauth-model.ts
+++ b/server/lib/oauth-model.ts
@@ -68,11 +68,10 @@ function saveToken (token: TokenInfo, client: OAuthClientInstance, user: UserIns
68 userId: user.id 68 userId: user.id
69 } 69 }
70 70
71 return db.OAuthToken.create(tokenToCreate).then(function (tokenCreated: any) { 71 return db.OAuthToken.create(tokenToCreate).then(tokenCreated => {
72 tokenCreated.client = client 72 const tokenToReturn = Object.assign(tokenCreated, { client, user })
73 tokenCreated.user = user
74 73
75 return tokenCreated 74 return tokenToReturn
76 }) 75 })
77} 76}
78 77