Advertisement
linuxyamigos

Untitled

Mar 21st, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. export default function protegeRutas(context) {
  3.    
  4.     let arg = {};
  5.     context.store.commit('auth/REFRESH_TOKEN', arg);
  6.     console.log(arg.out);  // Promise {<pending>}
  7.  
  8.     if (context.route.path == '/tres' && context.store.state.auth.authUser.id == null) {
  9.         context.store.commit('auth/SET_ALERT', 'Acceso no autorizado');
  10.         context.redirect('/');
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement