Skip to content

Commit

Permalink
fix const
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinelc321 committed May 8, 2024
1 parent 35017a6 commit dc7f003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/middleware_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

const (
wantedResourceProviderNamespace = "Microsoft.RedHatOpenShift"
resourceTypeOpenshiftCluster = "openShiftClusters"
resourceTypeHCPOpenshiftCluster = "HcpOpenShiftClusters"
)

var rxResourceGroupName = regexp.MustCompile(`^[-a-z0-9_().]{0,89}[-a-z0-9_()]$`)
Expand Down Expand Up @@ -65,7 +65,7 @@ func MiddlewareValidate() MiddlewareFunc {
}

if resourceType != "" {
if resourceType != strings.ToLower(resourceTypeOpenshiftCluster) {
if resourceType != strings.ToLower(resourceTypeHCPOpenshiftCluster) {
arm.WriteError(w, http.StatusBadRequest, arm.CloudErrorCodeInvalidResourceType, "", "The resource type '%s' could not be found in the namespace '%s' for api version '%s'.", resourceType, resourceProviderNamespace, apiVersion)
return
}
Expand Down

0 comments on commit dc7f003

Please sign in to comment.