import { t as trpc } from './trpc-client-Bucti7HD.js';
import '@trpc/client';

const PATCH = async ({ params, request }) => {
  const { agent, id } = params;
  const patch = await request.json().catch(() => ({}));
  const updated = await trpc.tests.patchTest.mutate({ agent, id, patch });
  if (!updated) return new Response("Not found", { status: 404 });
  return new Response(JSON.stringify(updated), { headers: { "content-type": "application/json" } });
};
const DELETE = async ({ params }) => {
  const { agent, id } = params;
  const ok = await trpc.tests.deleteTest.mutate({ agent, id });
  return new Response(JSON.stringify({ ok }), { headers: { "content-type": "application/json" } });
};

export { DELETE, PATCH };
//# sourceMappingURL=_server.ts-NihBmQtS.js.map
