Merge pull request #15 from ThomasRubini/get_game_info
This commit is contained in:
commit
2ced516acc
@ -45,23 +45,6 @@ def join_game():
|
|||||||
response = {}
|
response = {}
|
||||||
response["status"] = "ok"
|
response["status"] = "ok"
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@routes_api.route("/getGameInfo", methods=["GET", "POST"])
|
|
||||||
def get_game_info(): # DEPRECATED, SHOULD BE REMOVED
|
|
||||||
response = {}
|
|
||||||
game_id = flask.request.values.get("game_id")
|
|
||||||
if game_id == None:
|
|
||||||
response["status"] = "No 'game_id' argument"
|
|
||||||
return response
|
|
||||||
game = game_logic.get_game_info(game_id)
|
|
||||||
if game == None:
|
|
||||||
response["status"] = "Game {} does not exist".format(game_id)
|
|
||||||
return response
|
|
||||||
else:
|
|
||||||
response["status"] = "ok"
|
|
||||||
response["game_id"] = game_id
|
|
||||||
response["token"] = game.start_token
|
|
||||||
return response
|
|
||||||
|
|
||||||
@routes_api.route("/startGame", methods=["GET", "POST"])
|
@routes_api.route("/startGame", methods=["GET", "POST"])
|
||||||
def start_game():
|
def start_game():
|
||||||
|
Loading…
Reference in New Issue
Block a user