Revert partial changes from 6193fe2, keeping changes to preview_middleware and teams_new
This commit is contained in:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user