From 18f5be0b4e484199169496d0eb72d6b483176d01 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Thu, 18 Jun 2020 22:02:02 +0200 Subject: [PATCH] asume teams in default format --- python/httpAPI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/httpAPI.py b/python/httpAPI.py index f9692be..77a2a37 100644 --- a/python/httpAPI.py +++ b/python/httpAPI.py @@ -28,8 +28,8 @@ def getPlayer(): def getOutcomePrediction(): '''Make a prediction based tww submitted teams of players''' - teamA = flask.request.json["teamA"] - teamB = flask.request.json["teamB"] + teamB = [ db.getPlayer(pJson["id"]) for pJson in flask.request.get("teamA") ] + teamB = [ db.getPlayer(pJson["id"]) for pJson in flask.request.get("teamB") ] cnameTeamA = flask.request.get("cnameTeamA") cnameTeamB = flask.request.get("cnameTeamB")