rig route path update

This commit is contained in:
makearmy 2025-09-29 15:41:30 -04:00
parent 0cf4661264
commit 6261e51d6c
2 changed files with 3 additions and 3 deletions

View file

@ -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",

View file

@ -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");
}