From 29bd2ef0ecf693c36ad4a9d330750b6ad3ecabb5 Mon Sep 17 00:00:00 2001 From: daanoor Date: Mon, 22 Feb 2021 14:46:15 +0100 Subject: Aantal potjes teogevoegd aan status.py. commentaar bij users = int --- api/status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/status.py b/api/status.py index 6739c9d..a1b183a 100644 --- a/api/status.py +++ b/api/status.py @@ -1,10 +1,14 @@ from flask import Blueprint +from db import cursor status = Blueprint('status', __name__) @status.route('/status') def index(): - return "" + return { + # "users": int, + "games": len(cursor.execute ("select game_id from games where status = \"in_progress\"").fetchall()) +} dynamic_route = ["/", status] -- cgit v1.2.3