From e1fe4f660d7252ae110b967a068d98c238d28a78 Mon Sep 17 00:00:00 2001 From: Patrick Fairbank Date: Mon, 22 Aug 2022 17:32:20 -0700 Subject: [PATCH] Redirect to match play after finalizing alliance selection. --- web/alliance_selection.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/alliance_selection.go b/web/alliance_selection.go index 3dbc3d8..b418bf0 100755 --- a/web/alliance_selection.go +++ b/web/alliance_selection.go @@ -254,7 +254,13 @@ func (web *Web) allianceSelectionFinalizeHandler(w http.ResponseWriter, r *http. // Signal displays of the bracket to update themselves. web.arena.ScorePostedNotifier.Notify() - http.Redirect(w, r, "/alliance_selection", 303) + // Load the first playoff match. + matches, err := web.arena.Database.GetMatchesByType("elimination") + if err == nil && len(matches) > 0 { + _ = web.arena.LoadMatch(&matches[0]) + } + + http.Redirect(w, r, "/match_play", 303) } // Publishes the alliances to the web.