Move session management into session store
Trying to get rid of the redirect to signin on any page refresh
This commit is contained in:
parent
bf156eaf7f
commit
efa01cffc2
8 changed files with 34 additions and 69 deletions
|
|
@ -12,13 +12,12 @@ onMounted(() => {
|
|||
session
|
||||
.get()
|
||||
.then((session: Session) => {
|
||||
console.log("session loaded", session);
|
||||
console.log("hit home with a valid session, going to dash");
|
||||
router.push("/_/dash");
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log("root session not loaded", e);
|
||||
console.log("hit home with no session, going to signin");
|
||||
router.push("/signin");
|
||||
});
|
||||
console.log("home mounted");
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue