cambios del 24 de abril
This commit is contained in:
9
APP/middleware/notAuthenticated.js
Normal file
9
APP/middleware/notAuthenticated.js
Normal file
@@ -0,0 +1,9 @@
|
||||
//If the user has a token, we send it to index
|
||||
//Si el usuario tiene token lo enviamos a index
|
||||
export default function({ store, redirect }) {
|
||||
store.dispatch('readToken');
|
||||
|
||||
if (store.state.auth) {
|
||||
return redirect('/compras')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user