From 7f2aa506e2f4f67f95dcb250a2484fa8980732cb Mon Sep 17 00:00:00 2001 From: idanstark42 Date: Mon, 10 Feb 2020 22:11:13 +0200 Subject: [PATCH] Update match_logic.js --- server/logic/match_logic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/logic/match_logic.js b/server/logic/match_logic.js index 9fdc3d8..b055366 100644 --- a/server/logic/match_logic.js +++ b/server/logic/match_logic.js @@ -60,7 +60,7 @@ function getMatchesByTime (time, amountOfMatches, stage) { { 'startTime': { $gt: new Date(time) } }, { 'stage': stageToQuery } ] - }).limit(amountOfMatches).toArray() + }).sort({ 'startTime': 1 }).limit(amountOfMatches).toArray() }) }