mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +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,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable node/prefer-global/process */
|
||||
export default defineNuxtRouteMiddleware((to) => {
|
||||
if (to.path === '/writing' && process.env.NODE_ENV !== 'development') {
|
||||
return navigateTo('/', {
|
||||
|
||||
Reference in New Issue
Block a user