/**
 * @description Middleware to check if user is admin
 */
import store from '@/store/user.vue';

export default function adminMiddleware({ next, router }) {
  if (!localStorage.getItem('token')) {
	return router.push({ name: 'login' });
  }

  return next();
}