diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-13 19:59:20 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-13 19:59:20 +0200 |
commit | ede55b317dea7915f4ced8b628d2b31262dc2847 (patch) | |
tree | 3bfa73097f36dc6b1e7b08648d9f43579318eba3 /server.js | |
parent | 4d7bdc955a2e6dd2c222f985c7fbc9b4febbccc4 (diff) | |
download | server-ede55b317dea7915f4ced8b628d2b31262dc2847.tar.gz |
Show active tournaments on main tournament page.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2750,6 +2750,8 @@ const TM_SEED_LIST_USER = SQL(` order by seed_name `) +const TM_POOL_LIST_ACTIVE = SQL("select * from tm_pool_active_view") + const TM_POOL_LIST_USER_ACTIVE = SQL(` select * from tm_pool_active_view where not is_finished and pool_id in ( @@ -2983,7 +2985,8 @@ const TM_SELECT_SEED_READY_MINI_CUP = SQL(` app.get("/tm/list", function (req, res) { let seeds = TM_SEED_LIST_ALL.all(req.user ? req.user.user_id : 0) let seeds_by_title = object_group_by(seeds, "title_id") - res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title }) + let active_pools = TM_POOL_LIST_ACTIVE.all() + res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title, active_pools }) }) app.get("/tm/seed/:seed_name", function (req, res) { |