Pass through config link to redux
parent
74ffdab074
commit
b2591828fe
|
@ -64,6 +64,7 @@ export const getMeAsync = ({shouldResetMe = false} = {}) => async dispatch => {
|
|||
users,
|
||||
organizations,
|
||||
meLink,
|
||||
config,
|
||||
} = await getMeAJAX()
|
||||
dispatch(
|
||||
meGetCompleted({
|
||||
|
@ -72,7 +73,9 @@ export const getMeAsync = ({shouldResetMe = false} = {}) => async dispatch => {
|
|||
logoutLink,
|
||||
})
|
||||
)
|
||||
dispatch(linksReceived({external, users, organizations, me: meLink})) // TODO: put this before meGetCompleted... though for some reason it doesn't fire the first time then
|
||||
dispatch(
|
||||
linksReceived({external, users, organizations, me: meLink, config})
|
||||
) // TODO: put this before meGetCompleted... though for some reason it doesn't fire the first time then
|
||||
} catch (error) {
|
||||
dispatch(meGetFailed())
|
||||
dispatch(errorThrown(error))
|
||||
|
|
|
@ -10,7 +10,15 @@ const addBasepath = (url, excludeBasepath) => {
|
|||
}
|
||||
|
||||
const generateResponseWithLinks = (response, newLinks) => {
|
||||
const {auth, logout, external, users, organizations, me: meLink} = newLinks
|
||||
const {
|
||||
auth,
|
||||
logout,
|
||||
external,
|
||||
users,
|
||||
organizations,
|
||||
me: meLink,
|
||||
config,
|
||||
} = newLinks
|
||||
return {
|
||||
...response,
|
||||
auth: {links: auth},
|
||||
|
@ -19,6 +27,7 @@ const generateResponseWithLinks = (response, newLinks) => {
|
|||
users,
|
||||
organizations,
|
||||
meLink,
|
||||
config,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue