mirror of
https://iceshrimp.dev/blueb/Chuckya-fe-standalone.git
synced 2026-01-11 13:33:21 -08:00
Merge patchset from akko branch
This commit is contained in:
parent
d235afc303
commit
960614ec6f
22 changed files with 350 additions and 69 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue