From b4f243ab13734c6f014c92ec8ca50449531a2d2e Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 16 May 2023 19:20:40 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9Aerr=20!=3D=20nil=20return=20nil=20(?= =?UTF-8?q?#680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openplatform/miniprogram/component/component.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openplatform/miniprogram/component/component.go b/openplatform/miniprogram/component/component.go index 2ad70e0..8fff007 100644 --- a/openplatform/miniprogram/component/component.go +++ b/openplatform/miniprogram/component/component.go @@ -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)