This commit is contained in:
Kevin Chung
2016-03-17 21:06:21 -07:00
parent 11be9d7f0e
commit 742132abdb
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def scores():
db.session.close()
json = {'standings':[]}
for i, x in enumerate(teams):
json['standings'].append({'pos':i+1, 'id':x.teamid, 'name':x.name,'score':int(x.score)})
json['standings'].append({'pos':i+1, 'id':x.teamid, 'team':x.name,'score':int(x.score)})
return jsonify(json)

View File

@@ -28,7 +28,7 @@ function updatescores () {
teams = $.parseJSON(JSON.stringify(data));
$('#scoreboard > tbody').empty()
for (var i = 0; i < teams['standings'].length; i++) {
row = "<tr><td>{0}</td><td><a href='/team/{1}'>{2}</a></td><td>{3}</td></tr>".format(i+1, teams['standings'][i].id, htmlentities(teams['standings'][i].name), teams['standings'][i].score)
row = "<tr><td>{0}</td><td><a href='/team/{1}'>{2}</a></td><td>{3}</td></tr>".format(i+1, teams['standings'][i].id, htmlentities(teams['standings'][i].team), teams['standings'][i].score)
$('#scoreboard > tbody').append(row)
};
});