Skip to content

Commit

Permalink
removes use of fallthrough to simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
s-amann committed Apr 17, 2024
1 parent c933deb commit df5cf98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/middleware_validatesubscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ func (s *SubscriptionStateMuxValidator) MiddlewareValidateSubscriptionState(w ht
arm.CloudErrorInvalidSubscriptionState, "",
UnregisteredSubscriptionStateMessage,
subscriptionId)
case arm.Warned:
fallthrough // Warned has the same behaviour as Suspended
case arm.Suspended:
case arm.Warned, arm.Suspended:
if r.Method != http.MethodGet && r.Method != http.MethodDelete {
arm.WriteError(w, http.StatusConflict,
arm.CloudErrorInvalidSubscriptionState, "",
Expand Down

0 comments on commit df5cf98

Please sign in to comment.