From d721c8755e5fd5c8398d4f965070f89dd549b258 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 22 May 2022 16:46:06 +0200 Subject: Don't require owner to have joined public games. Required for tournament games (where administrator is the owner) to show. --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f720e95..5882ba8 100644 --- a/server.js +++ b/server.js @@ -940,14 +940,14 @@ const SQL_INSERT_REMATCH = SQL(` const QUERY_LIST_GAMES = SQL(` SELECT * FROM game_view WHERE is_private=0 AND status=? - AND EXISTS ( SELECT 1 FROM players WHERE players.game_id = game_view.game_id AND user_id = game_view.owner_id ) + AND EXISTS ( SELECT 1 FROM players WHERE players.game_id = game_view.game_id ) ORDER BY mtime DESC `); const QUERY_LIST_GAMES_OF_TITLE = SQL(` SELECT * FROM game_view WHERE is_private=0 AND title_id=? AND status=? - AND EXISTS ( SELECT 1 FROM players WHERE players.game_id = game_view.game_id AND user_id = game_view.owner_id ) + AND EXISTS ( SELECT 1 FROM players WHERE players.game_id = game_view.game_id ) ORDER BY mtime DESC LIMIT ? `); -- cgit v1.2.3