From 6261e51d6c480e4f711e990d7eba02878660bc44 Mon Sep 17 00:00:00 2001 From: makearmy Date: Mon, 29 Sep 2025 15:41:30 -0400 Subject: [PATCH] rig route path update --- app/rigs/RigBuilderClient.tsx | 2 +- app/rigs/RigsListClient.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"); }