refactor: add setter for jwtToken
This commit is contained in:
parent
0f3de13f52
commit
070b117089
|
@ -28,7 +28,8 @@ import * as URL from 'url';
|
|||
|
||||
export class AccountApi {
|
||||
private apiUrl: string;
|
||||
private jwtToken?: string;
|
||||
private _jwtToken?: string;
|
||||
|
||||
|
||||
constructor(apiUrl: string) {
|
||||
let apiUrlParsed = new URL.URL(apiUrl);
|
||||
|
@ -37,6 +38,10 @@ export class AccountApi {
|
|||
this.apiUrl = apiUrlParsed.toString();
|
||||
}
|
||||
|
||||
set jwtToken(value: string) {
|
||||
this._jwtToken = value;
|
||||
}
|
||||
|
||||
public static create(apiUrl: string): AccountApi {
|
||||
return new AccountApi(apiUrl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue