JWT refresh

This commit is contained in:
2020-11-29 20:23:20 +01:00
parent e48d300ca9
commit 6d02533d69
18 changed files with 69 additions and 22 deletions

View File

@@ -60,11 +60,12 @@ export default function EditRestaurantPhoto(props) {
.then((res) => {
dispatch(hideBackdrop());
dispatch(notification("Zmieniono zdjęcie.", "success"));
dispatch(refreshUserData(token));
dispatch(refreshUserData());
})
.catch((e) => {
dispatch(hideBackdrop());
dispatch(notification("Nie udało się zmienić zdjęcia :(", "error"));
throw e;
});
};
return (