8 lines
178 B
TypeScript
8 lines
178 B
TypeScript
export default defineNuxtRouteMiddleware(async (to, from) => {
|
|
const auth = useCookie("auth");
|
|
if (auth.value === undefined) {
|
|
} else {
|
|
return navigateTo("/");
|
|
}
|
|
});
|