fix sorting

This commit is contained in:
baz 2024-12-31 00:23:55 +00:00
parent c1efae3b69
commit 8bd4fce5f1
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ async function getLeaderboardEntries() {
results.push(result);
}
await results.sort((a, b) => parseInt(b.dateLastBeat) - parseInt(a.dateLastBeat));
await results.sort((a, b) => parseInt(a.dateLastBeat) - parseInt(b.dateLastBeat));
await results.sort((a, b) => parseInt(b.count) - parseInt(a.count));
return results;
@ -347,7 +347,7 @@ async function getLeaderboardEntriesBetweenDates(start, end) {
results.push(result);
}
await results.sort((a, b) => parseInt(b.dateLastBeat) - parseInt(a.dateLastBeat));
await results.sort((a, b) => parseInt(a.dateLastBeat) - parseInt(b.dateLastBeat));
await results.sort((a, b) => parseInt(b.count) - parseInt(a.count));
return results;