From 3682e456846d14f827a2f736e08b93aba0076540 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 5 Nov 2024 21:54:37 +0100 Subject: Improve tournament sorting order. --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server.js') 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) { -- cgit v1.2.3