From de91e6df6d2262b80d532a05172b46d617280c9d Mon Sep 17 00:00:00 2001 From: Steven Weathers Date: Thu, 19 Sep 2024 20:04:20 -0400 Subject: [PATCH] Fix storyboard create endpoint --- internal/http/poker.go | 2 +- internal/http/retro.go | 1 - internal/http/storyboard.go | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/http/poker.go b/internal/http/poker.go index d03785c6..e45da541 100644 --- a/internal/http/poker.go +++ b/internal/http/poker.go @@ -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 diff --git a/internal/http/retro.go b/internal/http/retro.go index 2eeac9c8..506f2f9b 100644 --- a/internal/http/retro.go +++ b/internal/http/retro.go @@ -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 diff --git a/internal/http/storyboard.go b/internal/http/storyboard.go index d417386c..9c38358b 100644 --- a/internal/http/storyboard.go +++ b/internal/http/storyboard.go @@ -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