From 4fef201e9597f85a5117fed0f698f76efe14b6f3 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Tue, 5 May 2026 11:33:05 -0400 Subject: [PATCH] fix: remove /api prefix from model-groups API calls (api.js already prepends it) --- static/index.html | 2 +- static/js/pages/model_groups.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/index.html b/static/index.html index 6f8adf94..e45fe4a6 100644 --- a/static/index.html +++ b/static/index.html @@ -181,6 +181,6 @@ - + diff --git a/static/js/pages/model_groups.js b/static/js/pages/model_groups.js index d8502986..a85be0a3 100644 --- a/static/js/pages/model_groups.js +++ b/static/js/pages/model_groups.js @@ -22,7 +22,7 @@ class ModelGroupsPage { async loadGroups() { try { - const groups = await api.get('/api/model-groups'); + const groups = await api.get('/model-groups'); const list = document.getElementById('model-groups-list'); if (!groups || groups.length === 0) { list.innerHTML = '
No model groups defined. Create one to enable auto-routing.
'; @@ -58,7 +58,7 @@ class ModelGroupsPage { async showEditForm(id) { try { - const groups = await api.get('/api/model-groups'); + const groups = await api.get('/model-groups'); const group = groups.find(g => g.id === id); if (group) this.renderForm(group); } catch (err) { @@ -138,9 +138,9 @@ class ModelGroupsPage { try { if (isEdit) { - await api.put('/api/model-groups/' + encodeURIComponent(id), body); + await api.put('/model-groups/' + encodeURIComponent(id), body); } else { - await api.post('/api/model-groups', body); + await api.post('/model-groups', body); } document.getElementById('model-group-form').style.display = 'none'; await this.loadGroups(); @@ -152,7 +152,7 @@ class ModelGroupsPage { async deleteGroup(id) { if (!confirm('Delete model group "' + id + '"? This cannot be undone.')) return; try { - await api.delete('/api/model-groups/' + encodeURIComponent(id)); + await api.delete('/model-groups/' + encodeURIComponent(id)); await this.loadGroups(); } catch (err) { alert('Failed to delete: ' + err.message);