made draft seasons redirect to season_league view

This commit is contained in:
2026-02-19 19:18:39 +11:00
parent 9eb252da3e
commit 970346f15d
2 changed files with 50 additions and 16 deletions

View File

@@ -2,6 +2,7 @@ package handlers
import (
"context"
"fmt"
"net/http"
"git.haelnorr.com/h/golib/hws"
@@ -41,6 +42,9 @@ func SeasonPage(
}); !ok {
return
}
if season.Type == db.SeasonTypeDraft.String() {
http.Redirect(w, r, fmt.Sprintf("/seasons/%s/leagues/%s", season.ShortName, "Draft"), http.StatusTemporaryRedirect)
}
renderSafely(seasonsview.DetailPage(season, leaguesWithTeams), s, r, w)
})
}