aboutsummaryrefslogtreecommitdiff
path: root/api/status.py
blob: a47c6c4733987c7e60ce11f3c28571213feec952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from flask import Blueprint
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()
		)
	}


dynamic_route = ["/", status]