fix front
All checks were successful
Build SMS Gateway / Build image (push) Successful in 16s

This commit is contained in:
2026-02-02 07:20:37 +07:00
parent f72f335807
commit d71d83a044
3 changed files with 18 additions and 5 deletions

View File

@@ -188,9 +188,15 @@
async function loadBalance() {
try {
const res = await fetch(basePath + "/balance");
const config = window.SMS_CONFIG || {};
const params = new URLSearchParams({ login: config.login, psw: config.psw });
const res = await fetch(basePath + "/balance?" + params);
const data = await res.json();
document.getElementById("balance").textContent = data.balance;
if (data.error) {
document.getElementById("balance").textContent = "Auth Error";
} else {
document.getElementById("balance").textContent = data.balance;
}
} catch (err) {
document.getElementById("balance").textContent = "Error";
}