fix: route web controls through proxy auth
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user