captsa add alert
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user