import { api_url } from "~/src/variables";export default defineNuxtRouteMiddleware(async (to, from) => { const {data, error} = await useFetch<{ connected: boolean, user: {email: string, root: boolean, username: string, user_id: number} }>(api_url+"check-session"); if(!data.value?.connected){ return navigateTo("/"); }else{ // Pass variable }});