library bumps

fix for LoginView.vue reloading instead of logging in.
improved errors for login failing
misc cleanup.
This commit is contained in:
Peter Dwyer
2023-02-07 14:39:26 +00:00
parent 84eec0c0bf
commit 1fbe359448
4 changed files with 726 additions and 444 deletions

View File

@@ -73,14 +73,22 @@ export default createStore({
if ('next' in router.currentRoute.value.query) {
router.push(router.currentRoute.value.query.next)
} else {
router.push('/')
router.push('browse')
}
})
.catch((error)=>{
// console.log(error);
const $toast = useToast();
$toast.error(error.response.data.detail, {position:'top'});
if (error.response.data.detail) {
$toast.error(error.response.data.detail, {position:'top'});
}
if (error.response.data.username) {
$toast.error("Username: " + error.response.data.username, {position:'top'});
}
if (error.response.data.password) {
$toast.error("Password: " + error.response.data.password, {position:'top'});
}
})
},
refreshToken(){