diff --git a/app/rigs/RigBuilderClient.tsx b/app/rigs/RigBuilderClient.tsx index bd0d8f02..b9f0a7e2 100644 --- a/app/rigs/RigBuilderClient.tsx +++ b/app/rigs/RigBuilderClient.tsx @@ -128,7 +128,7 @@ export default function RigBuilderClient() { body.laser_focus_lens = null; } - const res = await fetch("/api/my/rigs", { + const res = await fetch("/api/rigs", { method: "POST", headers: { "Content-Type": "application/json" }, credentials: "include", diff --git a/app/rigs/RigsListClient.tsx b/app/rigs/RigsListClient.tsx index 88d05f3a..e2229d07 100644 --- a/app/rigs/RigsListClient.tsx +++ b/app/rigs/RigsListClient.tsx @@ -20,7 +20,7 @@ export default function RigsListClient() { async function load() { setLoading(true); try { - const res = await fetch("/api/my/rigs", { credentials: "include", cache: "no-store" }); + const res = await fetch("/api/rigs", { credentials: "include", cache: "no-store" }); const data = await res.json(); setRows(Array.isArray(data) ? data : []); } finally { @@ -32,7 +32,7 @@ export default function RigsListClient() { async function remove(id: string | number) { if (!confirm("Delete this rig?")) return; - const res = await fetch(`/api/my/rigs?id=${encodeURIComponent(String(id))}`, { method: "DELETE", credentials: "include" }); + const res = await fetch(`/api/rigs?id=${encodeURIComponent(String(id))}`, { method: "DELETE", credentials: "include" }); if (res.ok) load(); else alert("Failed to delete"); }