mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
Testing login backend
This commit is contained in:
@@ -85,6 +85,7 @@ export class edit extends Component {
|
||||
axios
|
||||
.post("/updateProfileInfo", newProfileData)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.setState({
|
||||
loading: false
|
||||
});
|
||||
@@ -92,6 +93,7 @@ export class edit extends Component {
|
||||
// TODO: Need to redirect user to their profile page
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
this.setState({
|
||||
errors: err.response.data,
|
||||
loading: false
|
||||
|
||||
@@ -23,13 +23,13 @@ export const loginUser = (loginData, history) => (dispatch) => {
|
||||
});
|
||||
}
|
||||
|
||||
export const getProfileInfo = () => (dispatch) => {
|
||||
axios.get('/getProfileInfo')
|
||||
.then((res) => {
|
||||
dispatch({
|
||||
type: SET_USER,
|
||||
payload: res.data,
|
||||
})
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
}
|
||||
// export const getProfileInfo = () => (dispatch) => {
|
||||
// axios.get('/getProfileInfo')
|
||||
// .then((res) => {
|
||||
// dispatch({
|
||||
// type: SET_USER,
|
||||
// payload: res.data,
|
||||
// })
|
||||
// })
|
||||
// .catch((err) => console.error(err));
|
||||
// }
|
||||
Reference in New Issue
Block a user