add player rank to player query

This commit is contained in:
Yannik Schmidt
2020-06-19 01:53:05 +02:00
parent d0c3403cba
commit 9d764ac987
2 changed files with 12 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ def getPlayer():
p = db.getPlayer(playerId)
if not p:
return ("Player not found", 404)
return "{}'s Rating: {}".format(p.name, int(p.rating.mu - 2*p.rating.sigma))
return "{}'s Rating: {} (Rank {})".format(p.name, int(p.rating.mu - 2*p.rating.sigma), db.getPlayerRank(p))
@app.route('/get-outcome-prediction', methods=["POST"])
def getOutcomePrediction():