Skip to content

Commit

Permalink
[nspcc-dev#112] api: fix calls of deprecated BoxData
Browse files Browse the repository at this point in the history
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
  • Loading branch information
masterSplinter01 committed Jul 26, 2021
1 parent 93516ae commit 0e159a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/layer/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ func (n *layer) ListObjectsV2(ctx context.Context, p *ListObjectsParamsV2) (*Lis
return nil, err
}

if data, ok := ctx.Value(api.GateData).(*accessbox.GateData); ok && data != nil {
accessKey = data.AccessKey
if data, ok := ctx.Value(api.BoxData).(*accessbox.Box); ok && data != nil {
accessKey = data.Gate.AccessKey
} else {
return nil, fmt.Errorf("couldn't get access key from the accessbox: %s", err)
}
Expand Down

0 comments on commit 0e159a4

Please sign in to comment.