summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-05 21:54:37 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-05 21:54:37 +0100
commit3682e456846d14f827a2f736e08b93aba0076540 (patch)
treeff598ed6abc3a5e0e24c184fedd2c950d94247c6 /server.js
parent7986145f941bfb5a898c91eb175e3a740d663ea0 (diff)
downloadserver-3682e456846d14f827a2f736e08b93aba0076540.tar.gz
Improve tournament sorting order.
Diffstat (limited to 'server.js')
-rw-r--r--server.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.js b/server.js
index b9bc612..ce2dd38 100644
--- a/server.js
+++ b/server.js
@@ -2961,7 +2961,8 @@ 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")
let active_pools = TM_POOL_LIST_ACTIVE.all()
- res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title, active_pools })
+ let pools_by_seed = object_group_by(active_pools, "seed_name")
+ res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title, active_pools, pools_by_seed })
})
app.get("/tm/seed/:seed_name", function (req, res) {