From 1a90cb82b461568579e481f90b536e5cbd4fbf50 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 24 Jul 2023 12:04:57 +0200 Subject: Fix rematch button. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 3fc6274..38093c0 100644 --- a/server.js +++ b/server.js @@ -1121,7 +1121,7 @@ const SQL_DELETE_PLAYER_ROLE = SQL("DELETE FROM players WHERE game_id=? AND role const SQL_SELECT_OPEN_GAMES = SQL(`SELECT * FROM games WHERE status=${STATUS_OPEN}`) const SQL_COUNT_OPEN_GAMES = SQL(`SELECT COUNT(*) FROM games WHERE owner_id=? AND status=${STATUS_OPEN}`).pluck() -const SQL_SELECT_REMATCH = SQL(`SELECT game_id FROM games WHERE status = ${STATUS_FINISHED} AND notice=?`).pluck() +const SQL_SELECT_REMATCH = SQL(`SELECT game_id FROM games WHERE status < ${STATUS_FINISHED} AND notice=?`).pluck() const SQL_INSERT_REMATCH = SQL(` INSERT INTO games (owner_id, title_id, scenario, options, is_private, is_random, notice) -- cgit v1.2.3