import { q as query } from '../../../chunks/db_Du3AmLCY.mjs';
export { renderers } from '../../../renderers.mjs';

const GET = async ({ request, redirect }) => {
  const url = new URL(request.url);
  const uid = url.searchParams.get("uid");
  if (uid) {
    await query("UPDATE users SET unsubscribed = true WHERE id = $1", [uid]);
  }
  return redirect("/?unsubscribed=1");
};

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

const page = () => _page;

export { page };
