diff options
author | Loek Le Blansch <32883851+lonkaars@users.noreply.github.com> | 2021-02-22 14:50:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 14:50:45 +0100 |
commit | 2c0bb9666c82459bb97a50a0b47aab4cc0dfeb14 (patch) | |
tree | 6db17c173ac14b72211bbdc2e4eb586cc1c367d3 /api | |
parent | 582d78d60f43846f2beed6a6b9d17c8edf72115c (diff) | |
parent | 06493b18dd57c8dbaf771a579488d720c7bcb460 (diff) |
Merge pull request #3 from lonkaars/Daan
Status API endpoint
Diffstat (limited to 'api')
-rw-r--r-- | api/status.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api/status.py b/api/status.py index 6739c9d..6404a7f 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] |