Created
August 1, 2017 19:40
-
-
Save SeanRoberts/e2a33e586e027d0144e85a34319f451b to your computer and use it in GitHub Desktop.
This file contains 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 const doLogin = (email, password) => { | |
return (dispatch) => { | |
dispatch({ type: START_LOGIN }); | |
fetch(myLoginUrl, { email, password }) | |
.then(() => dispatch({ type: LOGIN_SUCCESS })) | |
.catch((err) => dispatch({ type: LOGIN_FAILURE, err: err })) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment