actions.open = (formName, id = null) => (dispatch) => { if (id) { dispatch({ [API_REQUEST]: { url: ['apiv2_user_get', {id}], success: (response, dispatch) => { dispatch(formActions.resetForm(formName, response, false)) } } }) } else { dispatch(formActions.resetForm(formName, UserTypes.defaultProps, true)) } }
success: (response, dispatch) => { dispatch(formActions.resetForm(formName, response, false)) }