We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b78fbe commit cc98443Copy full SHA for cc98443
1 file changed
webserver/app.py
@@ -297,6 +297,19 @@ def register_username():
297
}), 201
298
299
300
+@app.route('/api/user/count')
301
+def get_user_count():
302
+ """Get the total number of registered users"""
303
+ if not redis_client:
304
+ return jsonify({'error': 'Database unavailable'}), 503
305
+
306
+ count = redis_client.get('users:count')
307
308
+ return jsonify({
309
+ 'total_users': int(count) if count else 0
310
+ })
311
312
313
if __name__ == '__main__':
314
# Local development server
315
print(f"Games directory: {GAMES_DIR}")
0 commit comments