1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-09 07:02:27 +08:00

add: user update-remark api

* add DecodeWithCommonError function
* add UpdateRemark method
This commit is contained in:
Chyroc
2018-09-14 09:22:36 +08:00
parent 7239daf438
commit 188703be23
5 changed files with 50 additions and 48 deletions

View File

@@ -184,13 +184,6 @@ func (material *Material) DeleteMaterial(mediaID string) error {
if err != nil {
return err
}
var resDeleteMaterial util.CommonError
err = json.Unmarshal(response, &resDeleteMaterial)
if err != nil {
return err
}
if resDeleteMaterial.ErrCode != 0 {
return fmt.Errorf("DeleteMaterial error : errcode=%v , errmsg=%v", resDeleteMaterial.ErrCode, resDeleteMaterial.ErrMsg)
}
return nil
return util.DecodeWithCommonError(response, "DeleteMaterial")
}