import { H3Event, EventHandlerRequest } from "h3"; export default function (ev: H3Event) { if (!ev.context.currentUser) { throw createError({ statusCode: 401, statusMessage: "Authentication required", }); } }