Files
Kotyata/apps/client/middleware/01.slash.global.ts
2026-03-17 13:24:22 +03:00

8 lines
217 B
TypeScript

export default defineNuxtRouteMiddleware(async (to, from) => {
if (to.path === '/')
return navigateTo('/projects')
if (to.path !== '/' && to.path.endsWith('/'))
return navigateTo(to.path.slice(0, -1))
})