diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-04-25 17:01:12 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-04-25 17:01:12 +0200 |
commit | 152011d11e032a7297de855724d74da83fa6f1cb (patch) | |
tree | 0959ab7338681f63723d94fffb7c39a66cf561f9 /api/status.py | |
parent | f020b861915d7269a44f73c417626879c8e0176b (diff) |
added version number from package.json and commit hash to footer
Diffstat (limited to 'api/status.py')
-rw-r--r-- | api/status.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/api/status.py b/api/status.py index 32f96ee..a609d42 100644 --- a/api/status.py +++ b/api/status.py @@ -1,5 +1,11 @@ from flask import Blueprint from db import cursor +import json + +version = { + "number": json.loads(open("package.json", "r").read())["version"], + "commit": open(".git/refs/heads/master", "r").read().strip() +} status = Blueprint('server_status', __name__) @@ -13,7 +19,9 @@ def index(): cursor.execute( "select game_id from games where status = \"in_progress\"" ).fetchall() - ) + ), + "version": + version } |