Fix the score order

This commit is contained in:
Aaron Mueller 2013-05-16 22:56:23 +02:00
parent 9faee5f9d8
commit 5b4db62137

View file

@ -149,18 +149,22 @@ ig.module(
loadScores: function() {
ig.global.scores = undefined;
$.post('https://www.scoreoid.com/api/getScores', this.scoreoid, function(data) {
data = $.extend({}, {
order: 'desc',
order_by: 'score',
limit: 10
}, this.scoreoid);
$.post('https://www.scoreoid.com/api/getBestScores', data, function(data) {
ig.global.scores = data;
});
},
saveScore: function(username, score, cb) {
$.post('https://www.scoreoid.com/api/createScore', {
api_key: this.scoreoid.api_key,
game_id: this.scoreoid.game_id,
data = $.extend({}, {
score: score,
username: username
}, cb(this));
}, this.scoreoid);
$.post('https://www.scoreoid.com/api/createScore', data, cb(this));
},
draw: function() {