forked from TrueCloudLab/frostfs-sdk-go
[#334] client: Use parameter key in object.Get
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1929b634a1
commit
f75a5feba3
1 changed files with 6 additions and 1 deletions
|
@ -321,7 +321,12 @@ func (c *Client) ObjectGetInit(ctx context.Context, prm PrmObjectGet) (*ObjectRe
|
||||||
req.SetBody(&body)
|
req.SetBody(&body)
|
||||||
c.prepareRequest(&req, &prm.meta)
|
c.prepareRequest(&req, &prm.meta)
|
||||||
|
|
||||||
err := signature.SignServiceMessage(&c.prm.key, &req)
|
key := prm.key
|
||||||
|
if key == nil {
|
||||||
|
key = &c.prm.key
|
||||||
|
}
|
||||||
|
|
||||||
|
err := signature.SignServiceMessage(key, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("sign request: %w", err)
|
return nil, fmt.Errorf("sign request: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue