Skip to content

Commit

Permalink
Fix storyboard create endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWeathers committed Sep 20, 2024
1 parent d484b59 commit de91e6d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion internal/http/poker.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ func (s *Service) handlePokerCreate() http.HandlerFunc {
s.Failure(w, r, http.StatusBadRequest, Errorf(EINVALID, idErr.Error()))
return
}
TeamID, teamIdExists := vars["teamId"]

TeamID, teamIdExists := vars["teamId"]
if !teamIdExists && s.Config.RequireTeams {
s.Failure(w, r, http.StatusBadRequest, Errorf(EINVALID, "BATTLE_CREATION_REQUIRES_TEAM"))
return
Expand Down
1 change: 0 additions & 1 deletion internal/http/retro.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func (s *Service) handleRetroCreate() http.HandlerFunc {
return
}
TeamID, teamIdExists := vars["teamId"]

if !teamIdExists && s.Config.RequireTeams {
s.Failure(w, r, http.StatusBadRequest, Errorf(EINVALID, "RETRO_CREATION_REQUIRES_TEAM"))
return
Expand Down
6 changes: 0 additions & 6 deletions internal/http/storyboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ func (s *Service) handleStoryboardCreate() http.HandlerFunc {
return
}
TeamID, teamIdExists := vars["teamId"]
idErr = validate.Var(TeamID, "required,uuid")
if idErr != nil {
s.Failure(w, r, http.StatusBadRequest, Errorf(EINVALID, idErr.Error()))
return
}

if !teamIdExists && s.Config.RequireTeams {
s.Failure(w, r, http.StatusBadRequest, Errorf(EINVALID, "STORYBOARD_CREATION_REQUIRES_TEAM"))
return
Expand Down

0 comments on commit de91e6d

Please sign in to comment.