fix sql sorting

This commit is contained in:
biglyderv 2024-10-27 14:56:46 -04:00
parent 03fd03e703
commit 6c70e4e731

View file

@ -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 = {};