We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba2ecd8 commit e42933bCopy full SHA for e42933b
1 file changed
ui-core/ui/source/js/utils/actions.js
@@ -91,6 +91,30 @@ export const putRequest = (
91
)
92
};
93
94
+export const deleteRequest = (
95
+ requestActionCreator,
96
+ receiveActionCreator,
97
+ endpoint,
98
+ payload,
99
+ errorHandler
100
+) => params => dispatch => {
101
+ let url = URI(endpoint).toString();
102
+ dispatch(requestActionCreator(params));
103
+ const req = http.delete(url)
104
+ .send(payload)
105
+ .end(
106
+ responseHandler(
107
+ dispatch,
108
+ json => {
109
+ dispatch(receiveActionCreator({
110
+ response: json
111
+ }));
112
+ },
113
114
+ )
115
116
+};
117
+
118
export const clearMessage = createAction('CLEAR_MESSAGE');
119
120
export const showMessage = createAction('SHOW_MESSAGE');
0 commit comments