cli/command/service: runRollback: remove intermediate vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
aa96cb7aa0
commit
09b513ecfd
@ -42,12 +42,9 @@ func runRollback(ctx context.Context, dockerCLI command.Cli, options *serviceOpt
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
spec := &service.Spec
|
response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, service.Spec, types.ServiceUpdateOptions{
|
||||||
updateOpts := types.ServiceUpdateOptions{
|
Rollback: "previous", // TODO(thaJeztah): this should have a const defined
|
||||||
Rollback: "previous",
|
})
|
||||||
}
|
|
||||||
|
|
||||||
response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, *spec, updateOpts)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user