Skip to content

Commit

Permalink
fixes in env operation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
boppanasusanth committed Mar 27, 2024
1 parent eb3d1fd commit 62738cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/backend/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (e *Env) ValidateOperation(envName string, data envResp.OperationRequest) (
return validateOperationResponse, err
}

func (e *Env) OperateService(envName string, data envResp.OperationRequest) (envResp.OperationResponse, error) {
func (e *Env) OperateEnv(envName string, data envResp.OperationRequest) (envResp.OperationResponse, error) {
client := newApiClient()

response := client.actionWithRetry(path.Join(envEntity, envName)+"/operate/", "PUT", data)
Expand Down
9 changes: 2 additions & 7 deletions internal/command/commands/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,20 +457,15 @@ func (e *Env) Run(args []string) int {
}
}

operateResponse, err := envClient.OperateService(*name, data)
operateResponse, err := envClient.OperateEnv(*name, data)
if err != nil {
e.Logger.Error(err.Error())
return 1
}

errored := false

Check failure on line 465 in internal/command/commands/env.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
for _, operation := range operateResponse.Response.Operations {
e.Logger.Output(operation.Message)
}

if errored {
return 1
}
return 0
}

Expand Down

0 comments on commit 62738cc

Please sign in to comment.