FreePS/middleware/unauth.ts

8 lines
178 B
TypeScript
Raw Permalink Normal View History

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