Revert partial changes from 6193fe2, keeping changes to preview_middleware and teams_new

This commit is contained in:
2026-02-19 19:01:07 +11:00
parent 113d51eef8
commit 6e4331e5eb
13 changed files with 73 additions and 311 deletions

View File

@@ -50,11 +50,7 @@ func SeasonLeagueAddTeam(
}
// Redirect to refresh the page
redirectURL := fmt.Sprintf("/seasons/%s/leagues/%s/teams", season.ShortName, league.ShortName)
if season.Type == db.SeasonTypeDraft.String() {
redirectURL = fmt.Sprintf("/seasons/%s/teams", season.ShortName)
}
w.Header().Set("HX-Redirect", redirectURL)
w.Header().Set("HX-Redirect", fmt.Sprintf("/seasons/%s/leagues/%s/teams", season.ShortName, league.ShortName))
w.WriteHeader(http.StatusOK)
notify.Success(s, w, r, "Team Added", fmt.Sprintf(
"Successfully added '%s' to the league.",