summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-22 16:46:06 +0200
committerTor Andersson <tor@ccxvii.net>2022-05-22 16:46:36 +0200
commitd721c8755e5fd5c8398d4f965070f89dd549b258 (patch)
tree9656e5353cab1a10e13bfb56fdd08a32d7df0650 /server.js
parentea9492b6387e74771c00e3b3a1971c8b4dcb7a81 (diff)
downloadserver-d721c8755e5fd5c8398d4f965070f89dd549b258.tar.gz
Don't require owner to have joined public games.
Required for tournament games (where administrator is the owner) to show.
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files 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 ?
`);