Skip to content

Commit

Permalink
opensearchapi: fixes wrong response parsing for indices mapping and r…
Browse files Browse the repository at this point in the history
…ecovery

Signed-off-by: Jakob Hahn <[email protected]>
  • Loading branch information
Jakob3xD committed Jun 26, 2024
1 parent a5becda commit 3559e89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixes `Conditions` in `PolicyStateTransition` of ISM plugin ([#556](https://github.com/opensearch-project/opensearch-go/pull/556))
- Fixes integration test response validation when response is null ([#572](https://github.com/opensearch-project/opensearch-go/pull/572))
- Adjust security Role struct for FLS from string to []string ([#572](https://github.com/opensearch-project/opensearch-go/pull/572))
- Fixes wrong response parsing for indices mapping and recovery ([#572](https://github.com/opensearch-project/opensearch-go/pull/572))

### Security

Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_indices-mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c mappingClient) Field(ctx context.Context, req *MappingFieldReq) (*Mappin
data MappingFieldResp
err error
)
if data.response, err = c.apiClient.do(ctx, req, &data); err != nil {
if data.response, err = c.apiClient.do(ctx, req, &data.Indices); err != nil {
return &data, err
}

Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (c indicesClient) Recovery(ctx context.Context, req *IndicesRecoveryReq) (*
data IndicesRecoveryResp
err error
)
if data.response, err = c.apiClient.do(ctx, req, &data); err != nil {
if data.response, err = c.apiClient.do(ctx, req, &data.Indices); err != nil {
return &data, err
}

Expand Down

0 comments on commit 3559e89

Please sign in to comment.