diff --git a/LichessWebView/app.py b/LichessWebView/app.py index aa1e84d..3e73d85 100644 --- a/LichessWebView/app.py +++ b/LichessWebView/app.py @@ -53,10 +53,18 @@ def get_users(): 'monitored_gamers': row[7] }) + # Получаем общее количество игроков (уникальных) + cursor.execute(''' + SELECT COUNT(DISTINCT g.id) + FROM gamers g + ''') + total_gamers = cursor.fetchone()[0] + return jsonify({ 'success': True, 'users': users, - 'total': len(users) + 'total_users': len(users), + 'total_gamers': total_gamers }) except Exception as e: diff --git a/LichessWebView/templates/index.html b/LichessWebView/templates/index.html index 030845b..32400cb 100644 --- a/LichessWebView/templates/index.html +++ b/LichessWebView/templates/index.html @@ -235,7 +235,8 @@

👥 Пользователи

- Всего пользователей: 0 + Всего пользователей: 0
+ Кол-во игроков: 0