diff --git a/internal/gateway/ui/index.html b/internal/gateway/ui/index.html index c34898d..174e464 100644 --- a/internal/gateway/ui/index.html +++ b/internal/gateway/ui/index.html @@ -2268,6 +2268,7 @@ firstChunk = Date.now(); try { const resp = await fetch("/api/chat", { + method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model, @@ -2516,6 +2517,8 @@ btn.disabled = true; try { await api("/api/sources", { + method: "POST", + headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); toast(t("toastSaved")); @@ -3114,6 +3117,8 @@ }), ); await api("/api/auto", { + method: "PUT", + headers: { "Content-Type": "application/json" }, body: JSON.stringify({ rules }), }); } @@ -3372,6 +3377,8 @@ if (!name || !code) return toast(t("toastNeedAll")); try { await api("/api/adapters", { + method: "POST", + headers: { "Content-Type": "application/json" }, body: JSON.stringify({ name, code }), }); toast(t("toastUploaded")); @@ -3584,6 +3591,8 @@ } async function putScope(key, scopes) { await api("/api/keys/" + encodeURIComponent(key), { + method: "PUT", + headers: { "Content-Type": "application/json" }, body: JSON.stringify({ models: scopes }), }); } @@ -3905,6 +3914,8 @@ let j; try { j = await api("/api/keys", { + method: "POST", + headers: { "Content-Type": "application/json" }, body: JSON.stringify({ name, role: $("#kc-role").value,