From 8bd4fce5f13820be3bf54cd67bfae004db322318 Mon Sep 17 00:00:00 2001 From: baz Date: Tue, 31 Dec 2024 00:23:55 +0000 Subject: [PATCH] fix sorting --- databaseHelperFunctions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;