everybody loves a refactor
This commit is contained in:
@@ -38,6 +38,10 @@ func SeasonLeagueAddTeam(
|
||||
var err error
|
||||
team, season, league, err = db.NewTeamParticipation(ctx, tx, seasonStr, leagueStr, teamID, db.NewAudit(r, nil))
|
||||
if err != nil {
|
||||
if db.IsBadRequest(err) {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return false, nil
|
||||
}
|
||||
return false, errors.Wrap(err, "db.NewTeamParticipation")
|
||||
}
|
||||
return true, nil
|
||||
|
||||
Reference in New Issue
Block a user