Skip to content

Commit

Permalink
AMP-3469: remove debug logs not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
yingfeng-iu committed Dec 2, 2024
1 parent 8d76967 commit c3c8053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/components/navigation/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default {
},
methods: {
routeToHome() {
console.log("routeToHome()");
const self = this;
if (
self.$route.path === "/workflow/edit" &&
Expand All @@ -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.");
Expand Down
8 changes: 3 additions & 5 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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;
Expand Down

0 comments on commit c3c8053

Please sign in to comment.