refactor: if ping is successful, store the jwt token
This commit is contained in:
parent
271917540d
commit
3b2d839f04
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue