Skip to content

Commit

Permalink
Revert "24226 - Redirect external links" (bcgov#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Dec 17, 2024
1 parent d4e6499 commit 7937b69
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions auth-web/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Router from 'vue-router'
import { User } from '@/models/user'
import Vue from 'vue'
import { getRoutes } from './router'
import { handleExternalLinkRedirect } from '@/util/navigation'
import store from '@/stores/vuex'
import { useOrgStore } from '@/stores/org'
import { useUserStore } from '@/stores/user'
Expand Down Expand Up @@ -174,10 +173,6 @@ router.beforeEach(async (to, from, next) => {
return next({ path: `/${Pages.UPDATE_ACCOUNT}` })
}
}

if (handleExternalLinkRedirect(to.fullPath)) {
return
}
next()
}
})
Expand Down
9 changes: 0 additions & 9 deletions auth-web/src/util/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,3 @@ export const goToFormPage = (entityType): void => {
export const goToSocieties = (): void => {
window.open(appendAccountId(ConfigHelper.getSocietiesUrl()), '_blank')
}

export const handleExternalLinkRedirect = (path: string): boolean => {
if (path.includes('/http')) {
const cleanPath = path.replace(/^\//, '')
window.location.href = cleanPath
return true
}
return false
}

0 comments on commit 7937b69

Please sign in to comment.