captsa add alert

This commit is contained in:
2026-04-21 19:17:28 +03:00
parent 7e5bfcefa4
commit b0d933c1a0
9 changed files with 162 additions and 6 deletions

View File

@@ -94,6 +94,21 @@ def client_status():
return jsonify({'online': online, 'last_seen': last_seen})
# ------------------------------------------------------------------
# GET /dashboard/captcha-status
# Returns whether a captcha is currently active in the game client.
# ------------------------------------------------------------------
@dashboard.route('/dashboard/captcha-status', methods=['GET'])
def captcha_status():
conn = get_db()
row = conn.execute(
"SELECT value FROM kv_store WHERE key = 'captcha_active'"
).fetchone()
conn.close()
active = bool(row and row['value'] == '1')
return jsonify({'captcha_active': active})
# ------------------------------------------------------------------
# GET /dashboard/commands
# Returns command history (last 50) for the log panel.