fix balance endpoint (request/balance)
This commit is contained in:
2
app.py
2
app.py
@@ -284,7 +284,7 @@ def sms_guard():
|
||||
con = db(); now = int(time.time())
|
||||
ip = request.headers.get("X-Real-IP") or request.remote_addr or "?"
|
||||
# balance: refuse if house SMSPool balance below $5
|
||||
st, b = sms_api("balance")
|
||||
st, b = sms_api("request/balance")
|
||||
bal = jf(b) or {}
|
||||
try: bal = float(bal.get("balance", 0))
|
||||
except Exception: bal = 0
|
||||
|
||||
Reference in New Issue
Block a user