[#243] cmd/cli: Write tombstone address in Object.Delete cmd

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-11 11:23:23 +03:00 committed by Alex Vanin
parent fe3906c295
commit 09916f21b5
3 changed files with 6 additions and 5 deletions

View file

@ -248,7 +248,8 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
if err != nil {
return err
}
err = cli.DeleteObject(ctx,
tombstoneAddr, err := client.DeleteObject(cli, ctx,
new(client.DeleteObjectParams).WithAddress(objAddr),
client.WithTTL(getTTL()),
client.WithSession(tok),
@ -258,7 +259,7 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
}
cmd.Println("Object removed successfully.")
cmd.Printf(" ID: %s\n CID: %s\n", objAddr.ObjectID(), objAddr.ContainerID())
cmd.Printf(" ID: %s\n CID: %s\n", tombstoneAddr.ObjectID(), tombstoneAddr.ContainerID())
return nil
}