mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-24 08:50:31 +01:00
@@ -11,14 +11,14 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
|
||||
if (isMaintenance.value && to.path !== '/maintenance') {
|
||||
return navigateTo('/maintenance', {
|
||||
redirectCode: 301
|
||||
redirectCode: 301,
|
||||
})
|
||||
}
|
||||
|
||||
if (!isMaintenance.value && to.path === '/maintenance') {
|
||||
return navigateTo('/', {
|
||||
redirectCode: 301,
|
||||
replace: true
|
||||
replace: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user