Настроил синхронизацию домена до запроса

This commit is contained in:
Sipachev Igor 2022-03-23 13:29:34 +07:00
parent 1146bf8f3b
commit bc356f6cfa

View File

@ -41,6 +41,7 @@ export class HttpClient {
constructor (baseUrl: string) { constructor (baseUrl: string) {
this.baseUrl = baseUrl this.baseUrl = baseUrl
this.syncBaseUrlWithStand()
} }
async syncBaseUrlWithStand () { async syncBaseUrlWithStand () {
@ -52,8 +53,6 @@ export class HttpClient {
} }
send (schema: SchemaInterface, data: any | null = null): Promise<AxiosResponse> { send (schema: SchemaInterface, data: any | null = null): Promise<AxiosResponse> {
this.syncBaseUrlWithStand()
let url = schema.url let url = schema.url
const preparedData = data const preparedData = data
for (const key in data) { for (const key in data) {