diff options
Diffstat (limited to 'iridescence/src/views')
-rw-r--r-- | iridescence/src/views/Admin.vue | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/iridescence/src/views/Admin.vue b/iridescence/src/views/Admin.vue index 5274740..f1cf227 100644 --- a/iridescence/src/views/Admin.vue +++ b/iridescence/src/views/Admin.vue @@ -27,6 +27,15 @@ export default { ProductEditList, NewProduct, ProductSearch + }, + beforeRouteEnter: (to, from, next) => { + fetch(process.env.VUE_APP_LOGIN_URL).then(res => { + if (res.status == 401) { + next(false); + } else { + next(); + } + }); } }; </script> |