fix: route web controls through proxy auth

This commit is contained in:
Курнат Андрей
2026-07-19 22:09:59 +03:00
parent be5c9d482a
commit 0ec64645b6
5 changed files with 16 additions and 9 deletions
+3 -3
View File
@@ -110,7 +110,7 @@ async function loadSnapshot(manual = false, fromAuth = false) {
$("#refreshButton").classList.add("is-spinning");
if (manual) setText("syncLabel", "Обновление…");
try {
const snapshot = await api("/api/dashboard/snapshot");
const snapshot = await api("/web-api/dashboard/snapshot");
state.snapshot = snapshot;
render(snapshot);
setOffline(false);
@@ -411,7 +411,7 @@ async function requestControl(action) {
if (!confirmed) return;
setControlsBusy(true);
try {
await api(`/api/control/${action}`, { method: "POST" });
await api(`/web-api/control/${action}`, { method: "POST" });
toast(start ? "Торговый цикл запущен." : "Торговый цикл остановлен.");
await loadSnapshot(true);
} catch (error) {
@@ -436,7 +436,7 @@ async function onFastTradingChange(event) {
if (!confirmed) { toggle.checked = previous; return; }
toggle.disabled = true;
try {
const result = await api("/api/config/fast-trading", { method: "POST", body: JSON.stringify({ enabled }) });
const result = await api("/web-api/config/fast-trading", { method: "POST", body: JSON.stringify({ enabled }) });
toast(`Быстрая торговля ${enabled ? "включена" : "выключена"}${result.env_persisted === false ? " только в runtime" : ""}.`);
await loadSnapshot(true);
} catch (error) {