aboutsummaryrefslogtreecommitdiff
path: root/api/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/status.py')
-rw-r--r--api/status.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/api/status.py b/api/status.py
index 19a01a1..45410a4 100644
--- a/api/status.py
+++ b/api/status.py
@@ -3,12 +3,18 @@ from db import cursor
status = Blueprint('server_status', __name__)
+
@status.route('/status')
def index():
- return {
- # "users": int,
- "games": len(cursor.execute ("select game_id from games where status = \"in_progress\"").fetchall())
- }
+ return {
+ # "users": int,
+ "games":
+ len(
+ cursor.execute(
+ "select game_id from games where status = \"in_progress\""
+ ).fetchall()
+ )
+ }
-dynamic_route = ["/", status]
+dynamic_route = ["/", status]