rename game_api.py to game_functions.py

This commit is contained in:
Thomas Rubini 2022-11-29 09:09:46 +01:00
parent e2301ec1e7
commit 4da6d75913
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import flask import flask
from truthseeker import game_api from truthseeker import game_functions
api_routes = flask.Blueprint("api", __name__) api_routes = flask.Blueprint("api", __name__)
@ -8,7 +8,7 @@ api_routes = flask.Blueprint("api", __name__)
def create_game(): def create_game():
response = {} response = {}
response["status"] = "ok" response["status"] = "ok"
response["gameId"] = game_api.create_game().id response["gameId"] = game_functions.create_game().id
return response return response
@api_routes.route("/getGameInfo") @api_routes.route("/getGameInfo")
@ -18,7 +18,7 @@ def get_game_info():
if gameid == None: if gameid == None:
response["status"] = "No 'gameid' argument" response["status"] = "No 'gameid' argument"
return response return response
game = game_api.get_game_info(gameid) game = game_functions.get_game_info(gameid)
if game == None: if game == None:
response["status"] = "Game {} does not exist".format(gameid) response["status"] = "Game {} does not exist".format(gameid)
return response return response