fixed typo

This commit is contained in:
Jack 2021-09-07 15:03:11 +01:00
parent 6a8a9d7bbc
commit b931730ae9

View file

@ -58,11 +58,11 @@ class LeaderboardsDAO {
])
.toArray();
let rerval = undefined;
let retval = undefined;
lb.forEach((lbEntry, index) => {
lbEntry.rank = index + 1;
if (uid && lbEntry.uid === uid) {
rerval = index + 1;
retval = index + 1;
}
});
@ -75,7 +75,7 @@ class LeaderboardsDAO {
.collection(`leaderboards.${language}.${mode}.${mode2}`)
.insertMany(lb);
if (rerval) {
if (retval) {
return {
message: "Successfully updated leaderboard",
rank: retval,