diff options
author | Puyodead1 <puyodead@proton.me> | 2022-12-23 18:34:36 -0500 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-03-18 19:27:39 -0400 |
commit | 0db1fa5f0b2b9b357c1f96178c0e5df7858a99ab (patch) | |
tree | b045eee5f984a40ae47413bad2458cf65eff3c8e /src/util/dtos/ConnectedAccountDTO.ts | |
parent | Don't try to upload entire config for each connection loaded (diff) | |
download | server-0db1fa5f0b2b9b357c1f96178c0e5df7858a99ab.tar.xz |
Refreshable connections, refactoring, access-token endpoint
- Aded /users/@me/connections/:connection_name/:connection_id/access-token - Replaced `access_token` property on ConnectedAccount with `token_data` object for refreshing tokens - Made a common interface for connection things like ComonOAuthTokenResponse - Added `RefreshableConnection` class - Added token refresh to Spotify connection (disabled)
Diffstat (limited to 'src/util/dtos/ConnectedAccountDTO.ts')
-rw-r--r-- | src/util/dtos/ConnectedAccountDTO.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/dtos/ConnectedAccountDTO.ts b/src/util/dtos/ConnectedAccountDTO.ts index debc5535..ca15ff41 100644 --- a/src/util/dtos/ConnectedAccountDTO.ts +++ b/src/util/dtos/ConnectedAccountDTO.ts @@ -23,8 +23,8 @@ export class ConnectedAccountDTO { this.id = connectedAccount.external_id; this.user_id = connectedAccount.user_id; this.access_token = - connectedAccount.access_token && with_token - ? connectedAccount.access_token + connectedAccount.token_data && with_token + ? connectedAccount.token_data.access_token : undefined; this.friend_sync = connectedAccount.friend_sync; this.name = connectedAccount.name; |