From 56edf7e4d6bc6fd1549dc3807bd85760276698c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Mon, 19 Oct 2020 10:00:47 +0200 Subject: [PATCH] by-name endpoint sorts wins newest first. --- api/lottery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/lottery.js b/api/lottery.js index bdd9032..62ee497 100644 --- a/api/lottery.js +++ b/api/lottery.js @@ -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) })) }