export default defineEventHandler(async (event) => { const config = await useRuntimeConfig(event) //const body = await readBody(event) const session = await getUserSession(event) // @ts-ignore const userId = session.secure?.user_id; if (userId == undefined || userId == null) throw createError({ status: 401 }) const r = await fetch(config.fastapi_url + "/me" + '?' + new URLSearchParams({ id: userId })) let body = await r.json(); try { delete body["id"]; } catch {} try { delete body["password"]; } catch {} try { delete body["created_at"] } catch {} try { delete body["updated_at"]; } catch {} return body; })