Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fredmaggiowski committed Jun 20, 2024
1 parent 679497d commit b9fea7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/cmd/extensions/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"github.com/mia-platform/miactl/internal/resources/extensibility"
)

const minimalSuccessStatusCode = 399

const extensibilityAPIPrefix = "/api/extensibility"

const (
Expand Down Expand Up @@ -65,7 +67,7 @@ func (e *E11yClient) Delete(ctx context.Context, companyID string, extensionID s
return fmt.Errorf("error executing request: %w", err)
}

if resp.StatusCode() > 399 {
if resp.StatusCode() > minimalSuccessStatusCode {
return resp.Error()
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/extensions/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down

0 comments on commit b9fea7f

Please sign in to comment.