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:
Christian Mueller 2026-04-07 03:50:33 +02:00
parent 0196891ef8
commit 19497fe335

View File

@ -108,7 +108,7 @@ export default function Layouts() {
async function updateElement(elId: number, field: string, value: any) { async function updateElement(elId: number, field: string, value: any) {
if (!selected) return; if (!selected) return;
try { try {
await api.put(`/api/layouts/elements/${elId}`, { [field]: value }); await api.put(`/api/layouts/${selected.id}/elements/${elId}`, { [field]: value });
selectLayout(selected.id); selectLayout(selected.id);
} catch (e) { setError((e as Error).message); } } catch (e) { setError((e as Error).message); }
} }