added team view to season_leagues

This commit is contained in:
2026-02-20 19:57:06 +11:00
parent 98b110ee44
commit 53102f561a
25 changed files with 1018 additions and 51 deletions

View File

@@ -21,11 +21,11 @@ func SeasonLeaguePage(
seasonStr := r.PathValue("season_short_name")
leagueStr := r.PathValue("league_short_name")
var season *db.Season
var sl *db.SeasonLeague
if ok := conn.WithReadTx(s, w, r, func(ctx context.Context, tx bun.Tx) (bool, error) {
var err error
season, _, _, err = db.GetSeasonLeague(ctx, tx, seasonStr, leagueStr)
sl, err = db.GetSeasonLeague(ctx, tx, seasonStr, leagueStr)
if err != nil {
if db.IsBadRequest(err) {
throw.NotFound(s, w, r, r.URL.Path)
@@ -38,7 +38,7 @@ func SeasonLeaguePage(
return
}
defaultTab := season.GetDefaultTab()
defaultTab := sl.Season.GetDefaultTab()
redirectURL := fmt.Sprintf(
"/seasons/%s/leagues/%s/%s",
seasonStr, leagueStr, defaultTab,