Skip to content

Commit

Permalink
upd(repair): use repair action directly from meroxa package
Browse files Browse the repository at this point in the history
Co-authored by Diana Doherty <[email protected]>
  • Loading branch information
jayjayjpg committed Feb 2, 2022
1 parent 9acaa71 commit a69cdfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/meroxa/root/environments/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ func (r *Repair) Client(client meroxa.Client) {
}

func (r *Repair) ParseArgs(args []string) error {
if len(args) < 1 {
if len(args) < 1 {
return errors.New("requires environment name or uuid")
}
r.args.NameOrUUID = args[0]
return nil
}

func (r *Repair) Execute(ctx context.Context) error {
rr, err := r.client.PerformActionOnEnvironment(ctx, r.args.NameOrUUID, &meroxa.RepairEnvironmentInput{Action: "repair"})
rr, err := r.client.PerformActionOnEnvironment(ctx, r.args.NameOrUUID, &meroxa.RepairEnvironmentInput{Action: meroxa.EnvironmentActionRepair}) // nolint:lll
if err != nil {
return err
}
Expand Down

0 comments on commit a69cdfe

Please sign in to comment.