From 07c2b124e4348b15f1e5ec18c6cdfd77248c6bc8 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 16 Apr 2021 16:57:26 +0200 Subject: spaces > tabs in python :( --- api/game/accept.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'api/game/accept.py') diff --git a/api/game/accept.py b/api/game/accept.py index 3510ffd..e0681c8 100644 --- a/api/game/accept.py +++ b/api/game/accept.py @@ -16,14 +16,14 @@ join_game = Blueprint('game_accept', __name__) @join_game.route('/accept', methods=['POST']) @game_id_with_viewer def index(game_id, user_id): - if not user_id: return "", 400 - if cursor.execute("select status from games where game_id = ?", - [game_id]).fetchone()[0] != "wait_for_opponent": - return "", 403 + if not user_id: return "", 400 + if cursor.execute("select status from games where game_id = ?", + [game_id]).fetchone()[0] != "wait_for_opponent": + return "", 403 - start_game(game_id, user_id) + start_game(game_id, user_id) - return {"id": game_id, "player_1": False, "game_started": True}, 200 + return {"id": game_id, "player_1": False, "game_started": True}, 200 dynamic_route = ["/game", join_game] -- cgit v1.2.3