mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
Fix warning
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
import {SET_USER, SET_ERRORS, CLEAR_ERRORS, LOADING_UI} from '../types';
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
export const getUserData = () => (dispatch) => {
|
||||
axios.get('/user')
|
||||
.then((res) => {
|
||||
dispatch({
|
||||
type: SET_USER,
|
||||
payload: res.data,
|
||||
})
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
}
|
||||
|
||||
export const loginUser = (loginData, history) => (dispatch) => {
|
||||
dispatch({ type: LOADING_UI });
|
||||
axios
|
||||
@@ -22,14 +34,3 @@ export const loginUser = (loginData, history) => (dispatch) => {
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export const getUserData = () => (dispatch) => {
|
||||
axios.get('/user')
|
||||
.then((res) => {
|
||||
dispatch({
|
||||
type: SET_USER,
|
||||
payload: res.data,
|
||||
})
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
}
|
||||
Reference in New Issue
Block a user