From c3c8053ecade45383463639eee6921f88199ef3e Mon Sep 17 00:00:00 2001 From: yingfeng Date: Mon, 2 Dec 2024 15:43:44 -0500 Subject: [PATCH] AMP-3469: remove debug logs not needed --- src/components/navigation/Sidebar.vue | 2 -- src/router.js | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/navigation/Sidebar.vue b/src/components/navigation/Sidebar.vue index 8814b1a..c5941cf 100644 --- a/src/components/navigation/Sidebar.vue +++ b/src/components/navigation/Sidebar.vue @@ -112,7 +112,6 @@ export default { }, methods: { routeToHome() { - console.log("routeToHome()"); const self = this; if ( self.$route.path === "/workflow/edit" && @@ -127,7 +126,6 @@ export default { } }, routeTo(menu, data) { - console.log("routeTo()"); const self = this; if (self.$route.path === "/workflow/edit" && localStorage.getItem("activeWorkflowSession")) { alert("Workflow editor session is active. Please click on done button before leaving the page."); diff --git a/src/router.js b/src/router.js index 39f0ea9..88f6205 100644 --- a/src/router.js +++ b/src/router.js @@ -454,8 +454,8 @@ router.beforeEach(async (to, from, next) => { const { authorize } = to.meta; const currentUser = accountService.currentUserValue; - console.log("from: ", from, "\nto: ", to, "\nnext: ", next); - console.log("currentUser: ", currentUser); + console.log("router: from: ", from, "\nto: ", to, "\nnext: ", next); + console.log("router: currentUser: ", currentUser); if (env.getDisableAuth() == "true" || !authorize) { console.log("router: No auth needed.") @@ -468,16 +468,14 @@ router.beforeEach(async (to, from, next) => { // TODO // below API call is to validate the auth token before new page is loaded, in case the current login has expired; // there should be better way to achieve this without making such extra API call - console.log("validating user"); var success = await accountService.validate(); console.log("success = " + success); if (!success) { store.state.isAuthenticated = false; store.commit("isAuthenticated"); - console.log("router: Auth token invalid!") + console.log("router: Auth token invalid! routing to login page.") return next({ path: "/account/login", query: { returnUrl: to.path } }); } else { - console.log("checking permission"); store.state.isAuthenticated = true; let action = authorize.actionType + "-" + authorize.targetType; // let acActions = router.app.$store.state.acActions;