fix balance end
All checks were successful
Build SMS Gateway / Build image (push) Successful in 20s

This commit is contained in:
2026-02-02 06:25:30 +07:00
parent 45d77b0285
commit 7906bf786b
3 changed files with 14 additions and 4 deletions

View File

@@ -86,7 +86,17 @@ router.post("/clear-all-sms", (req, res) => {
});
// GET /balance - get account balance (SMSC API compatible)
router.get("/balance", (req, res) => {
router.get("/balance.php", (req, res) => {
const { login, psw } = req.query;
if (!login || !psw) {
return res.json({ error: "Отсутствуют обязательные параметры", error_code: 1 });
}
if (login !== AUTH_LOGIN || psw !== AUTH_PASSWORD) {
return res.json({ error: "Ошибка авторизации", error_code: 2 });
}
res.json({ balance: "1000.00" });
});