import { defineNuxtRouteMiddleware, navigateTo, useFetch } from "nuxt/app"; export default defineNuxtRouteMiddleware(async (to, from) => { const firstRun = await useFetch("/api/firstRun"); if (firstRun.data.value) return navigateTo({ path: "/firstRun" }); });