mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Minor changes and fixes
This commit is contained in:
parent
174e2084fc
commit
b76d5e61ff
3 changed files with 17 additions and 17 deletions
|
|
@ -51,11 +51,11 @@ func AddRedfishEndpoint(data []byte, headers map[string]string) error {
|
|||
// Add redfish endpoint via POST `/hsm/v2/Inventory/RedfishEndpoints` endpoint
|
||||
url := makeEndpointUrl("/Inventory/RedfishEndpoints")
|
||||
res, body, err := util.MakeRequest(url, "POST", data, headers)
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
if res != nil {
|
||||
if res.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("could not add redfish endpoint")
|
||||
}
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue