[#413] Use tree service to delete object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
49bd77d9cf
commit
977f176713
5 changed files with 53 additions and 73 deletions
|
@ -207,7 +207,7 @@ func (n *layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.Object
|
|||
return nil, err
|
||||
}
|
||||
|
||||
newVersion.OID = id
|
||||
newVersion.OID = *id
|
||||
if err = n.treeService.AddVersion(ctx, &p.BktInfo.CID, p.Object, newVersion); err != nil {
|
||||
return nil, fmt.Errorf("couldn't add new verion to tree service: %w", err)
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ func (n *layer) headLastVersionIfNotDeleted(ctx context.Context, bkt *data.Bucke
|
|||
return nil, apiErrors.GetAPIError(apiErrors.ErrNoSuchKey)
|
||||
}
|
||||
|
||||
meta, err := n.objectHead(ctx, bkt, *node.OID)
|
||||
meta, err := n.objectHead(ctx, bkt, node.OID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue