Skip to content

Commit

Permalink
frontend: Fix router guard
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
zhaojh329 committed Mar 15, 2020
1 parent 2646d55 commit 0d36eee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ const router = new VueRouter({
});

router.beforeEach((to, from, next) => {
if (to.path === '/rtty' && to.query.devid) {
next();
return;
}

if (to.path === '/' && to.query.id) {
router.push({path: '/rtty', query: {devid: to.query.id, username: to.query.username, password: to.query.password}});
return;
}

if (to.path !== '/login' && !sessionStorage.getItem('rtty-sid')) {
router.push('/login');
return;
Expand Down
2 changes: 1 addition & 1 deletion statik/statik.go

Large diffs are not rendered by default.

0 comments on commit 0d36eee

Please sign in to comment.