Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default function protegeRutas(context) {
- let arg = {};
- context.store.commit('auth/REFRESH_TOKEN', arg);
- console.log(arg.out); // Promise {<pending>}
- if (context.route.path == '/tres' && context.store.state.auth.authUser.id == null) {
- context.store.commit('auth/SET_ALERT', 'Acceso no autorizado');
- context.redirect('/');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement