export default defineNuxtRouteMiddleware(async () => { const api = useMapApi() try { const me = await api.me() if (!me.auths?.includes('admin')) { return navigateTo('/profile') } } catch { return navigateTo('/login') } })