redirect for login

This commit is contained in:
2026-01-14 12:36:26 +00:00
parent fb69a24bfe
commit 9b5cbd00f7
3 changed files with 14 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
export default defineNuxtRouteMiddleware((to, from) => {
const { ready, loggedIn} = useUserSession();
watch(ready, (value) => {
if (value) {
if (!loggedIn) navigateTo("/login");
}
})
})