Skip to content

Commit

Permalink
BED-4852 whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
mvlipka committed Oct 24, 2024
1 parent 2dc7edf commit b0a2d22
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/api/src/api/v2/auth/sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ import (
"strings"

"github.com/gorilla/mux"
"github.com/pkg/errors"
"github.com/specterops/bloodhound/src/api"
"github.com/specterops/bloodhound/src/auth"
"github.com/specterops/bloodhound/src/ctx"
"github.com/specterops/bloodhound/src/database"
"github.com/specterops/bloodhound/src/database/types/null"
"github.com/specterops/bloodhound/src/model"
"gorm.io/gorm/utils"
Expand Down Expand Up @@ -149,7 +147,7 @@ func (s ManagementResource) DeleteSSOProvider(response http.ResponseWriter, requ
api.WriteErrorResponse(request.Context(), api.BuildErrorResponse(http.StatusConflict, "user may not delete their own SSO auth provider", request), response)
} else if providerUsers, err := s.db.GetSSOProviderUsers(request.Context(), ssoProviderID); err != nil {
api.HandleDatabaseError(request, response, err)
} else if err = s.db.DeleteSSOProvider(request.Context(), ssoProviderID); errors.Is(err, database.ErrNotFound) {
} else if err = s.db.DeleteSSOProvider(request.Context(), ssoProviderID); err != nil {
api.HandleDatabaseError(request, response, err)
} else {
api.WriteJSONResponse(request.Context(), DeleteSSOProviderResponse{
Expand Down

0 comments on commit b0a2d22

Please sign in to comment.