diff --git a/src/services/ApiService.ts b/src/services/ApiService.ts index 3812eb7..aee8973 100644 --- a/src/services/ApiService.ts +++ b/src/services/ApiService.ts @@ -6,9 +6,12 @@ export default class ApiService { public api: AxiosInstance; + public config: AxiosRequestConfig | undefined; + constructor(root: RootStore, config?: AxiosRequestConfig | undefined) { this.root = root; - this.api = axios.create(config); + this.config = config; + this.api = axios.create(this.config); this.setupInterceptors(); } @@ -29,8 +32,4 @@ export default class ApiService { return Promise.reject(error); }); } - - get config(): AxiosRequestConfig | undefined { - return this.config; - } } diff --git a/src/stores/AuthStore.ts b/src/stores/AuthStore.ts index f742d05..0ffb94b 100644 --- a/src/stores/AuthStore.ts +++ b/src/stores/AuthStore.ts @@ -14,10 +14,6 @@ export default class AuthStore { makeAutoObservable(this); } - get getToken(): string | null { - return this.token; - } - public setIsLoggedIn(value: boolean) { Cookies.remove('logged_in'); this.isLoggedIn = value;