cli/command/service: runRollback: remove intermediate vars

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-02-03 20:31:52 +01:00
parent aa96cb7aa0
commit 09b513ecfd
+3 -6
View File
@@ -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
}