[#131] client: Add ID suffix to ResObjectPut.ReadStoredObject

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-11 18:16:04 +03:00 committed by LeL
parent b508f3b71e
commit 8d734d1020
2 changed files with 3 additions and 3 deletions

View file

@ -28,9 +28,9 @@ type ResObjectPut struct {
resp v2object.PutResponse
}
// ReadStoredObject reads identifier of the saved object.
// ReadStoredObjectID reads identifier of the saved object.
// Returns false if ID is missing (not read).
func (x *ResObjectPut) ReadStoredObject(id *oid.ID) bool {
func (x *ResObjectPut) ReadStoredObjectID(id *oid.ID) bool {
idv2 := x.resp.GetBody().GetObjectID()
if idv2 == nil {
return false

View file

@ -793,7 +793,7 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
var id oid.ID
if !res.ReadStoredObject(&id) {
if !res.ReadStoredObjectID(&id) {
return nil, errors.New("missing ID of the stored object")
}