From ab20f1be489293b042866b35fa567441445dc7cb Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Thu, 27 Aug 2026 12:14:41 +0800 Subject: [PATCH] fix(webui): specify DELETE method for source/template removal delSource and delTemplate called api() without a method, so fetch defaulted to GET; the DELETE handlers never ran and the UI silently left the item in place. --- internal/gateway/ui/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/gateway/ui/index.html b/internal/gateway/ui/index.html index e731afc..4be0e70 100644 --- a/internal/gateway/ui/index.html +++ b/internal/gateway/ui/index.html @@ -2720,7 +2720,9 @@ async function delTemplate(name) { if (!confirm(tFmt("tplConfirmDel", name))) return; try { - await api("/api/source_templates/" + encodeURIComponent(name), {}); + await api("/api/source_templates/" + encodeURIComponent(name), { + method: "DELETE", + }); toast(t("toastDelOk")); openTemplateModal(); } catch (e) { @@ -2816,8 +2818,9 @@ } async function delSource(name) { if (!confirm(tFmt("confirmDelSrc", name))) return; - await api("/api/sources/" + encodeURIComponent(name), { - }); + await api("/api/sources/" + encodeURIComponent(name), { + method: "DELETE", + }); toast(t("toastDelOk")); renderSources(); }