Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

补充 添加/删除 公众号模板消息接口 #440

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

ackerr
Copy link
Contributor

@ackerr ackerr commented Aug 20, 2021

officialaccount/message/template.go Outdated Show resolved Hide resolved
officialaccount/message/template.go Outdated Show resolved Hide resolved
ShortID string `json:"template_id_short"`
}{ShortID: shortID}
uri := fmt.Sprintf("%s?access_token=%s", templateAddURL, accessToken)
response, err := util.PostJSON(uri, msg)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个err被重新定义了,已经不是返回值中的err了。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}{TemplateID: templateID}

uri := fmt.Sprintf("%s?access_token=%s", templateDelURL, accessToken)
response, err := util.PostJSON(uri, msg)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Comment on lines 170 to 171
var result util.CommonError
return util.DecodeWithError(response, &result, "DeleteTemplate")
Copy link
Owner

@silenceper silenceper Aug 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以直接使用DecodeWithCommonError 哈,其他没什么问题了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

学到了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@silenceper silenceper merged commit d392ff7 into silenceper:release-2.0 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants