From c3455b34cd602bd0edea7b73c074f73038688159 Mon Sep 17 00:00:00 2001 From: jae Date: Wed, 1 Apr 2026 02:19:57 +0000 Subject: [PATCH] fix: deleteNavItem uses DELETE method instead of broken POST --- js/admin.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/admin.js b/js/admin.js index ca8b1c4..bf43e78 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1154,13 +1154,11 @@ const AdminApp = { async deleteNavItem(index) { if (!confirm('Delete this navigation item?')) return; - this.navData.splice(index, 1); try { - const res = await fetch(this.API + '/navigation', { - method: 'POST', - headers: this.authHeaders(), - body: JSON.stringify({ label, url, order }) + const res = await fetch(this.API + '/navigation/' + index, { + method: 'DELETE', + headers: this.authHeaders() }); if (!res.ok) throw new Error('Delete failed'); this.notify('Nav item deleted');