Merge patchset from akko branch

This commit is contained in:
Laura Hausmann 2023-10-12 20:13:42 +02:00
commit 960614ec6f
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
22 changed files with 350 additions and 69 deletions

View file

@ -53,6 +53,15 @@ const authorizationHeaderFromState = getState => {
/**
* @param {() => import('immutable').Map<string,any>} getState
* @returns string
*/
const baseUrlFromState = getState => {
const baseUrl = getState && getState().getIn(['meta', 'base_url'], '');
return `${baseUrl}`;
};
/**
* @param {() => import('immutable').Map} getState
* @returns {import('axios').AxiosInstance}
*/
export default function api(getState) {
@ -62,6 +71,8 @@ export default function api(getState) {
...authorizationHeaderFromState(getState),
},
baseURL: baseUrlFromState(getState),
transformResponse: [
function (data) {
try {