Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function loginUser () {
- return (dispatch, getState) => {
- const endPoint = "/api/v0/login"
- const body = JSON.stringify({
- "email": "xxx@gmail.com",
- "password": "12345"
- });
- axios({
- "method": "POST",
- "url": endPoint,
- "data": body
- })
- .then((response) => {
- dispatch(requestAccessToken(response.data.token));
- })
- .catch((error) => {
- console.warn(error)
- });
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement