1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 21:02:25 +08:00

Fix:err != nil return nil (#680)

This commit is contained in:
Sunny
2023-05-16 19:20:40 +08:00
committed by GitHub
parent d92cd35533
commit b4f243ab13

View File

@@ -36,7 +36,7 @@ type RegisterMiniProgramParam struct {
func (component *Component) RegisterMiniProgram(param *RegisterMiniProgramParam) error {
componentAK, err := component.GetComponentAccessToken()
if err != nil {
return nil
return err
}
url := fmt.Sprintf(fastregisterweappURL+"?action=create&component_access_token=%s", componentAK)
data, err := util.PostJSON(url, param)
@@ -58,7 +58,7 @@ type GetRegistrationStatusParam struct {
func (component *Component) GetRegistrationStatus(param *GetRegistrationStatusParam) error {
componentAK, err := component.GetComponentAccessToken()
if err != nil {
return nil
return err
}
url := fmt.Sprintf(fastregisterweappURL+"?action=search&component_access_token=%s", componentAK)
data, err := util.PostJSON(url, param)