remove component pre-route validation

we're using a global router guard, there's no need for it in the component
This commit is contained in:
2017-02-20 13:11:20 -07:00
parent 8265cb7f06
commit cda2ef36bd

View File

@@ -55,16 +55,6 @@
.then(() => this.$router.push({ name: 'login' })); .then(() => this.$router.push({ name: 'login' }));
} }
}, },
// pre-route auth checking
beforeRouteEnter(to, from, next) {
// if user is authenticated, continue
if (store.getters.isAuthenticated) return next();
// otherwise, redirect to login, preserving the requested route
const { name, fullPath } = to;
const query = (name !== undefined) ? { redirect: name } : { prev: fullPath };
return next({ name: 'login', query });
},
} }
</script> </script>