by-name endpoint sorts wins newest first.

This commit is contained in:
2020-10-19 10:00:47 +02:00
parent 46fb5dc6c1
commit 56edf7e4d6

View File

@@ -120,7 +120,7 @@ const byName = (req, res) => {
.then(highscore => res.send({
message: `Lottery winnings for name: ${ name }.`,
name: highscore.name,
highscore: highscore.wins
highscore: sortNewestFirst(highscore.wins)
}))
}