This commit is contained in:
David Erwin
2016-11-11 11:15:11 -05:00
parent 0ce892fe7a
commit 0c998e1196
@@ -16,8 +16,9 @@ export const FETCH_CONFIG_SUCCESS = 'FETCH_CONFIG_SUCCESS';
export function fetchConfig () {
return (dispatch) => {
dispatch({type: FETCH_CONFIG_REQUEST});
console.log('Fetching settings');
return fetch('/api/v1/settings')
.then(
response => {
@@ -26,11 +27,11 @@ export function fetchConfig () {
}
)
.then((json) => {
console.log(json);
return dispatch({type: FETCH_CONFIG_SUCCESS, config: fromJS(json)});
}).catch((error) => {
console.log(error);
})
.catch((error) => {
dispatch({type: FETCH_CONFIG_FAILED, error});
});
};
}