mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-19 06:54:20 +01:00
Closes #101
This commit is contained in:
@@ -30,7 +30,7 @@ def scores():
|
|||||||
db.session.close()
|
db.session.close()
|
||||||
json = {'standings':[]}
|
json = {'standings':[]}
|
||||||
for i, x in enumerate(teams):
|
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)
|
return jsonify(json)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function updatescores () {
|
|||||||
teams = $.parseJSON(JSON.stringify(data));
|
teams = $.parseJSON(JSON.stringify(data));
|
||||||
$('#scoreboard > tbody').empty()
|
$('#scoreboard > tbody').empty()
|
||||||
for (var i = 0; i < teams['standings'].length; i++) {
|
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)
|
$('#scoreboard > tbody').append(row)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user