more typescript changes/conversion nonsense (this broke a lot of stuff)
This commit is contained in:
@@ -17,7 +17,7 @@ const router = createRouter({
|
||||
{ path: '/transfer', component: () => import('@/pages/Transfer.vue'), meta: { requiresAuth: true, memberOnly: true } },
|
||||
{ path: '/calendar', component: () => import('@/pages/Calendar.vue'), meta: { requiresAuth: true, memberOnly: true } },
|
||||
{ path: '/trainingReport', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
|
||||
|
||||
|
||||
// ADMIN / STAFF ROUTES
|
||||
{
|
||||
path: '/administration',
|
||||
@@ -47,12 +47,12 @@ router.beforeEach(async (to) => {
|
||||
}
|
||||
|
||||
// Not logged in
|
||||
if (to.meta.requiresAuth && !user.isLoggedIn) {
|
||||
// Redirect back to original page after login
|
||||
const redirectUrl = encodeURIComponent(window.location.origin + to.fullPath)
|
||||
window.location.href = `https://aj17thdevapi.nexuszone.net/login?redirect=${redirectUrl}`
|
||||
return false // Prevent Vue Router from continuing
|
||||
}
|
||||
// if (to.meta.requiresAuth && !user.isLoggedIn) {
|
||||
// // Redirect back to original page after login
|
||||
// const redirectUrl = encodeURIComponent(window.location.origin + to.fullPath)
|
||||
// window.location.href = `https://aj17thdevapi.nexuszone.net/login?redirect=${redirectUrl}`
|
||||
// return false // Prevent Vue Router from continuing
|
||||
// }
|
||||
|
||||
|
||||
// // Must be a member
|
||||
Reference in New Issue
Block a user