blob: 5c09220bd53878e434d03b5eba87b5220ebda0c8 (
plain) (
blame)
1
2
3
4
5
|
export default function({ store, redirect }) {
// If the user is not authenticated
if (!store.state.auth.user) return redirect('/login');
if (!store.state.auth.user.isAdmin) return redirect('/dashboard');
}
|