import { g as getTokenFromRequest, v as verifyToken } from '../../../../chunks/auth_C2RFIYRJ.mjs';
export { renderers } from '../../../../renderers.mjs';

const GET = async ({ request }) => {
  const token = getTokenFromRequest(request);
  if (!token) return new Response(JSON.stringify({ authenticated: false }), { status: 401 });
  const payload = verifyToken(token);
  if (!payload) return new Response(JSON.stringify({ authenticated: false }), { status: 401 });
  return new Response(JSON.stringify({ authenticated: true, user: payload }), {
    headers: { "Content-Type": "application/json" }
  });
};

const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
  __proto__: null,
  GET
}, Symbol.toStringTag, { value: 'Module' }));

const page = () => _page;

export { page };
