Skip to content

Instantly share code, notes, and snippets.

@worst-developer
Created November 2, 2016 20:19
Show Gist options
  • Save worst-developer/d8af7e8b0dbc8b79dce80362d7eb81e8 to your computer and use it in GitHub Desktop.
Save worst-developer/d8af7e8b0dbc8b79dce80362d7eb81e8 to your computer and use it in GitHub Desktop.
export function signUp (data) {
return async dispatch => {
debugger;
const response = await httpPost('/auth/signup', data);
if (response.status !== 200) {
debugger;
dispatch({
type: Constants.REGISTRATIONS_ERROR,
error: response.statusText,
});
} else {
const result = await response.json();
dispatch(push('/signin'));
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment