feat: Initialize project with configuration files and basic structure
This commit is contained in:
6
middleware/auth.ts
Normal file
6
middleware/auth.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { useAuthStore } from '~/stores/auth';
|
||||
|
||||
export default defineNuxtRouteMiddleware(() => {
|
||||
const auth = useAuthStore();
|
||||
if (!auth.isAuthenticated) return navigateTo('/login');
|
||||
});
|
||||
Reference in New Issue
Block a user