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 19:41:20 +01:00
parent aa96cb7aa0
commit 09b513ecfd
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

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
}