fix nil ptr dereference
fix bug in transfers
This commit is contained in:
parent
a9e76149e8
commit
10a855a8ba
2 changed files with 9 additions and 7 deletions
sdk
|
@ -124,12 +124,14 @@ func (a *APIConfig) SetChannelCert(certHex string, channelID string) error {
|
|||
|
||||
endpoint := a.ApiURL + "/yt/channel_cert"
|
||||
|
||||
res, _ := http.PostForm(endpoint, url.Values{
|
||||
res, err := http.PostForm(endpoint, url.Values{
|
||||
"channel_claim_id": {channelID},
|
||||
"channel_cert": {certHex},
|
||||
"auth_token": {a.ApiToken},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return errors.Err(err)
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
body, _ := ioutil.ReadAll(res.Body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue