summary refs log tree commit diff
path: root/src/util/connections/RefreshableConnection.ts
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2023-12-11 01:12:54 +0100
committerEmma [it/its]@Rory& <root@rory.gay>2023-12-11 01:12:54 +0100
commit0a8ceb9e6349284e75545a01ffad608b020f78e2 (patch)
tree17a9163f963eddabf9168b0b630096b2f7535b64 /src/util/connections/RefreshableConnection.ts
parentPrettier: use editorconfig (diff)
downloadserver-ts-dev/emma-refactors.tar.xz
Actually run prettier dev/emma-refactors
Diffstat (limited to 'src/util/connections/RefreshableConnection.ts')
-rw-r--r--src/util/connections/RefreshableConnection.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/util/connections/RefreshableConnection.ts b/src/util/connections/RefreshableConnection.ts

index 88ad8dab..08b01c68 100644 --- a/src/util/connections/RefreshableConnection.ts +++ b/src/util/connections/RefreshableConnection.ts
@@ -30,17 +30,13 @@ export abstract class RefreshableConnection extends Connection { * Refreshes the token for a connected account. * @param connectedAccount The connected account to refresh */ - abstract refreshToken( - connectedAccount: ConnectedAccount, - ): Promise<ConnectedAccountCommonOAuthTokenResponse>; + abstract refreshToken(connectedAccount: ConnectedAccount): Promise<ConnectedAccountCommonOAuthTokenResponse>; /** * Refreshes the token for a connected account and saves it to the database. * @param connectedAccount The connected account to refresh */ - async refresh( - connectedAccount: ConnectedAccount, - ): Promise<ConnectedAccountCommonOAuthTokenResponse> { + async refresh(connectedAccount: ConnectedAccount): Promise<ConnectedAccountCommonOAuthTokenResponse> { const tokenData = await this.refreshToken(connectedAccount); connectedAccount.token_data = { ...tokenData, fetched_at: Date.now() }; await connectedAccount.save();