summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/server.js b/server.js
index d1f6ac8..b1aa38f 100644
--- a/server.js
+++ b/server.js
@@ -1405,10 +1405,8 @@ app.get('/replay/:game_id', function (req, res) {
if (game.status < 2)
return res.status(404).send("Invalid game ID.");
let players = SQL_SELECT_PLAYERS_JOIN.all(game_id);
- let replay = SQL_SELECT_REPLAY.all(game_id);
- if (replay.length > 0)
- return res.json({players, replay});
let state = SQL_SELECT_GAME_STATE.get(game_id);
+ let replay = SQL_SELECT_REPLAY.all(game_id);
return res.json({players, state, replay});
});