Skip to content

Commit

Permalink
Fix:err != nil return nil (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikilobyte authored May 16, 2023
1 parent d92cd35 commit b4f243a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openplatform/miniprogram/component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit b4f243a

Please sign in to comment.