Redirect to match play after finalizing alliance selection.

This commit is contained in:
Patrick Fairbank
2022-08-22 17:32:20 -07:00
parent 1896136abd
commit e1fe4f660d

View File

@@ -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.