mirror of
https://github.com/DeclanHoare/shiftgears.git
synced 2025-01-22 08:11:52 -05:00
Order Pong Highscores
I had expected the client to sort it and allow the user to choose ordering by level or codepoints, but it only displays the results in the order they are sent.
This commit is contained in:
parent
3d6f9adc38
commit
9eb12a165b
1 changed files with 2 additions and 2 deletions
4
unite.py
4
unite.py
|
@ -155,8 +155,8 @@ def get_display_name(uid, dbsession, authsession):
|
||||||
def get_pong_highscores(dbsession, authsession):
|
def get_pong_highscores(dbsession, authsession):
|
||||||
return flask.jsonify({"Pages": 0, # unused
|
return flask.jsonify({"Pages": 0, # unused
|
||||||
"Highscores": [mapping.map_to(user, mappings["PongHighscore"])
|
"Highscores": [mapping.map_to(user, mappings["PongHighscore"])
|
||||||
for user in dbsession.query(User).all()
|
for user in dbsession.query(User).filter(User.PongLevel.isnot(None)).filter(User.PongCP.isnot(None))
|
||||||
if user.PongLevel is not None and user.PongCP is not None]})
|
.order_by(User.PongCP.desc()).all()]})
|
||||||
|
|
||||||
@api_route("/GetEmail")
|
@api_route("/GetEmail")
|
||||||
def get_email(dbsession, authsession):
|
def get_email(dbsession, authsession):
|
||||||
|
|
Loading…
Reference in a new issue