import { v as verifyToken } from '../../../chunks/tokens_CAzj9Aj8.mjs'; export { renderers } from '../../../renderers.mjs'; const POST = async ({ request }) => { let body; try { body = await request.json(); } catch { return new Response(JSON.stringify({ error: "Invalid JSON" }), { status: 400, headers: { "Content-Type": "application/json" } }); } const { email, token } = body; if (!email || !token) { return new Response(JSON.stringify({ error: "email and token are required" }), { status: 400, headers: { "Content-Type": "application/json" } }); } const valid = await verifyToken(email, token); if (!valid) { return new Response(JSON.stringify({ error: "Invalid token" }), { status: 403, headers: { "Content-Type": "application/json" } }); } return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json" } }); }; const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({ __proto__: null, POST }, Symbol.toStringTag, { value: 'Module' })); const page = () => _page; export { page };