diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-16 16:57:26 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-16 16:57:26 +0200 |
commit | 07c2b124e4348b15f1e5ec18c6cdfd77248c6bc8 (patch) | |
tree | e4a29123d3ebedc1d25500390c904c66b3b02489 /api/game/accept.py | |
parent | aa2c999702dadba2afbcf2be9f597f890aafcc87 (diff) |
spaces > tabs in python :(
Diffstat (limited to 'api/game/accept.py')
-rw-r--r-- | api/game/accept.py | 12 |
1 files changed, 6 insertions, 6 deletions
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] |