fix "call of Unmarshal passes non-pointer as second argument"

This commit is contained in:
Chris Lu 2020-04-17 10:04:41 -07:00
parent 826f96b6f3
commit e0f5996560

View file

@ -117,7 +117,7 @@ func Delete(url string, jwt string) error {
return nil
}
m := make(map[string]interface{})
if e := json.Unmarshal(body, m); e == nil {
if e := json.Unmarshal(body, &m); e == nil {
if s, ok := m["error"].(string); ok {
return errors.New(s)
}