diff --git a/static/scoreboard.js b/static/scoreboard.js index 34ce2009..b3c256fb 100644 --- a/static/scoreboard.js +++ b/static/scoreboard.js @@ -32,7 +32,9 @@ function increase_score(id){ contentType: "application/json; charset=utf-8", data : JSON.stringify(team_id), success: function(result){ - + var updated = result.scoreboard; + updated.sort(function(a, b){ return b.score - a.score; }); + display_scoreboard(updated); }, error: function(request, status, error){ console.log("Error");