diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 8 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 6f11a36100..e0c3c8bf60 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -255,8 +255,12 @@ export class DaemonRpc { return response.getValue(); } - public async setAccount(accountToken?: AccountToken): Promise<void> { - await this.callString(this.client.setAccount, accountToken); + public async loginAccount(accountToken: AccountToken): Promise<void> { + await this.callString(this.client.loginAccount, accountToken); + } + + public async logoutAccount(): Promise<void> { + await this.callEmpty(this.client.logoutAccount); } // TODO: Custom tunnel configurations are not supported by the GUI. diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 782e6d3982..774343b7aa 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -1436,7 +1436,7 @@ class ApplicationMain { log.warn(`Failed to get account data, logging in anyway: ${verification.error.message}`); } - await this.daemonRpc.setAccount(accountToken); + await this.daemonRpc.loginAccount(accountToken); } catch (e) { const error = e as Error; log.error(`Failed to login: ${error.message}`); @@ -1475,7 +1475,7 @@ class ApplicationMain { private async logout(): Promise<void> { try { - await this.daemonRpc.setAccount(); + await this.daemonRpc.logoutAccount(); this.accountExpiryNotificationScheduler.cancel(); } catch (e) { |
