update
This commit is contained in:
@@ -149,6 +149,9 @@ export const refreshUserData = (token) => {
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err.status === 401) {
|
||||
dispatch(logout());
|
||||
}
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
@@ -237,7 +240,7 @@ export const changePassword = (email, password, token) => {
|
||||
|
||||
export const logout = () => {
|
||||
return function (dispatch) {
|
||||
dispatch(notification("Poprawnie wylogowano.", "success"));
|
||||
dispatch(notification("Wylogowano.", "info"));
|
||||
dispatch(toggles.setLoggedOut());
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user