del = (url, action_success, action_failure, dispatch) => {
  return fetch(url, {
    method: 'DELETE',
    credentials: 'same-origin',
  })
    .then(data =>
      dispatch({
        type: action_success.type,
        id: action_success.id,
      })
    )
    .catch(error => {
      dispatch({
        type: action_failure.type,
        [action_failure.name]: error,
      });
      dispatch(
        addNotification(
          getErrorMessage(),
          getDeleteErrorMessage(action_success.name),
          'error'
        )
      );
    });
}
Fetch wrapper for DELETE request that dispatches actions according to the
request status
@param {String} url
@param {Object} action_success
@param {Object} action_failure
@return {Function} dispatch