diff --git a/databaseHelperFunctions.js b/databaseHelperFunctions.js index 5f54ce6..1a7dbae 100644 --- a/databaseHelperFunctions.js +++ b/databaseHelperFunctions.js @@ -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;