export default eventHandler(async (ev) => { if (ev.context.currentUser) { deleteCookie(ev, "auth:token"); ev.context.currentUser = undefined; return { success: true, }; } throw createError({ statusCode: 400, message: "Not logged in" }); });