mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
fix: change policies API to return and take struct (#9181)
This allows for order guarantees in returned values can be consumed safely by the caller to avoid any additional parsing and validation. Fixes #9171
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
// GetConfig - returns the config.json of a minio setup, incoming data is encrypted.
|
||||
func (adm *AdminClient) GetConfig(ctx context.Context) ([]byte, error) {
|
||||
// Execute GET on /minio/admin/v2/config to get config of a setup.
|
||||
// Execute GET on /minio/admin/v3/config to get config of a setup.
|
||||
resp, err := adm.executeMethod(ctx,
|
||||
http.MethodGet,
|
||||
requestData{relPath: adminAPIPrefix + "/config"})
|
||||
@@ -66,7 +66,7 @@ func (adm *AdminClient) SetConfig(ctx context.Context, config io.Reader) (err er
|
||||
content: econfigBytes,
|
||||
}
|
||||
|
||||
// Execute PUT on /minio/admin/v2/config to set config.
|
||||
// Execute PUT on /minio/admin/v3/config to set config.
|
||||
resp, err := adm.executeMethod(ctx, http.MethodPut, reqData)
|
||||
|
||||
defer closeResponse(resp)
|
||||
|
||||
Reference in New Issue
Block a user