This commit is contained in:
Mikola
2023-12-05 14:15:04 +03:00
parent b66537f4a4
commit 9e10088494
32 changed files with 137 additions and 139 deletions

View File

@ -19,7 +19,7 @@ export const apiRequest = (
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json",
},
} = {},
} = {}
) => {
const fullHeaders = { ...headers, ...getToken() };
let urWithParams = urlHasParams(url);
@ -41,7 +41,7 @@ export const apiRequest = (
// dispatch(auth(false));
}
return resolve(response);
}),
})
)
.then((response) => new Promise((resolve) => resolve(response.data)));
};