From 9c02faa06170d7d3140bf252d1dca4630e4b0172 Mon Sep 17 00:00:00 2001
From: "Adam T. Carpenter" <atc@53hor.net>
Date: Sun, 27 Dec 2020 16:16:53 -0500
Subject: moved more deploy-specific data to config, finalized login process

---
 iridescence/src/views/Admin.vue | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'iridescence/src/views/Admin.vue')

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>
-- 
cgit v1.2.3

