aboutsummaryrefslogtreecommitdiff
path: root/src/site/middleware/admin.js
blob: fcac9c6e28f0331a6ab7b948687bcce5ddccf1f0 (plain) (blame)
1
2
3
4
5
export default function({ store, redirect }) {
	// If the user is not authenticated
	if (!store.state.user) return redirect('/login');
	if (!store.state.user.isAdmin) return redirect('/dashboard');
}