Feature #26729
closed
Add redux middleware for API calls
Added by Maria Agaphontzev almost 6 years ago.
Updated over 4 years ago.
Category:
JavaScript stack
|
Description
https://community.theforeman.org/t/wip-proposal-refactoring-our-redux/11640
The goal is to create a new infrastructure for API communication that will make it easier to do API calls from redux controllers.
So we can create actions that will look like this:
return {
type: API_REQUEST,
action: ACTIONS.GET,
url: `/foreman_tasks/tasks/summary/${hours}`,
subType: FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY,
normalizeResponse: (data) => data.results[0],
normalizeError: error => error.message,
onError: error => console.log(error),
}
- Pull request https://github.com/theforeman/foreman/pull/6739 added
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6894 added
- Pull request https://github.com/theforeman/foreman/pull/7069 added
- Fixed in Releases 1.24.0 added
- Status changed from Ready For Testing to Closed
- Pull request https://github.com/theforeman/foreman/pull/7121 added
- Pull request https://github.com/theforeman/foreman/pull/7157 added
- Fixed in Releases 2.0.0 added
- Pull request https://github.com/theforeman/foreman/pull/7228 added
- Pull request https://github.com/theforeman/foreman/pull/7207 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/7207)
Also available in: Atom
PDF