everybody loves a refactor
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"git.haelnorr.com/h/oslstats/internal/db"
|
||||
"git.haelnorr.com/h/oslstats/internal/notify"
|
||||
"git.haelnorr.com/h/oslstats/internal/respond"
|
||||
"git.haelnorr.com/h/oslstats/internal/validation"
|
||||
teamsview "git.haelnorr.com/h/oslstats/internal/view/teamsview"
|
||||
)
|
||||
@@ -88,8 +89,7 @@ func NewTeamSubmit(
|
||||
notify.Warn(s, w, r, "Duplicate Short Names", "This combination of short names is already taken.", nil)
|
||||
return
|
||||
}
|
||||
w.Header().Set("HX-Redirect", "/teams")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
respond.HXRedirect(w, "teams")
|
||||
notify.SuccessWithDelay(s, w, r, "Team Created", fmt.Sprintf("Successfully created team: %s", name), nil)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user