diff --git a/cli/command/service/rollback.go b/cli/command/service/rollback.go index f7efa2d498..156def02bb 100644 --- a/cli/command/service/rollback.go +++ b/cli/command/service/rollback.go @@ -42,12 +42,9 @@ func runRollback(ctx context.Context, dockerCLI command.Cli, options *serviceOpt return err } - spec := &service.Spec - updateOpts := types.ServiceUpdateOptions{ - Rollback: "previous", - } - - response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, *spec, updateOpts) + response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, service.Spec, types.ServiceUpdateOptions{ + Rollback: "previous", // TODO(thaJeztah): this should have a const defined + }) if err != nil { return err }