Created
November 2, 2016 20:19
-
-
Save worst-developer/d8af7e8b0dbc8b79dce80362d7eb81e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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