aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/oauth-model.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 10:59:13 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 10:59:13 +0200
commite6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d (patch)
treec50bf2ba57d54d2f87f51c29ad981da8c5660994 /server/lib/oauth-model.ts
parent33c4972d5b54155540267f4c9c9ee55c539b8385 (diff)
downloadPeerTube-e6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d.tar.gz
PeerTube-e6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d.tar.zst
PeerTube-e6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d.zip
Remove any typing from server
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