From 070b117089671f2a98de66ecf3b97b918a243212 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 13 Mar 2024 18:13:24 -0400 Subject: [PATCH] refactor: add setter for jwtToken --- src/account.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/account.ts b/src/account.ts index d5c07a4..d06999a 100644 --- a/src/account.ts +++ b/src/account.ts @@ -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); }