refactor: if ping is successful, store the jwt token

This commit is contained in:
Derrick Hammer 2024-03-18 17:21:53 -04:00
parent 271917540d
commit 3b2d839f04
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 1 deletions

View File

@ -183,7 +183,13 @@ export class AccountApi {
return false;
}
return this.checkSuccessVal(ret) && ret.data.ping == "pong";
const success = this.checkSuccessVal(ret) && ret.data.ping == "pong";
if (success) {
this._jwtToken = ret.data.token;
}
return success;
}
public async info(): Promise<boolean | AccountInfoResponse> {