fix: correct element update API URL to include layoutId

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 03:50:33 +02:00
co-authored by Claude Opus 4.6
parent 0196891ef8
commit 19497fe335
+1 -1
View File
@@ -108,7 +108,7 @@ export default function Layouts() {
async function updateElement(elId: number, field: string, value: any) {
if (!selected) return;
try {
await api.put(`/api/layouts/elements/${elId}`, { [field]: value });
await api.put(`/api/layouts/${selected.id}/elements/${elId}`, { [field]: value });
selectLayout(selected.id);
} catch (e) { setError((e as Error).message); }
}