2022-12-04 19:56:33 +00:00
|
|
|
export default defineNuxtRouteMiddleware((to) => {
|
2022-12-17 16:55:29 +00:00
|
|
|
if (process.server)
|
|
|
|
return
|
2022-12-20 21:03:15 +00:00
|
|
|
if (!currentUser.value && to.path !== '/signin/callback')
|
2022-12-04 20:05:11 +00:00
|
|
|
return navigateTo(`/${currentServer.value}/public`)
|
2022-12-04 19:56:33 +00:00
|
|
|
if (to.path === '/')
|
2022-11-15 13:54:13 +00:00
|
|
|
return navigateTo('/home')
|
|
|
|
})
|