fix sql sorting
This commit is contained in:
parent
03fd03e703
commit
6c70e4e731
1 changed files with 3 additions and 1 deletions
4
game.js
4
game.js
|
@ -15,8 +15,10 @@ class Game extends GameBasic {
|
||||||
this.ws = [];
|
this.ws = [];
|
||||||
}
|
}
|
||||||
async updateLeaderboard() {
|
async updateLeaderboard() {
|
||||||
let jason = await db.all('SELECT * FROM stats ORDER BY ko DESC LIMIT 100');
|
let jason = await db.all('SELECT * FROM stats ORDER BY CAST(ko AS REAL) DESC LIMIT 100');
|
||||||
|
|
||||||
|
console.log(jason)
|
||||||
|
|
||||||
let scoresOld = this.scores || [];
|
let scoresOld = this.scores || [];
|
||||||
|
|
||||||
let scores = {};
|
let scores = {};
|
||||||
|
|
Loading…
Reference in a new issue