Skip to content

Commit

Permalink
debug: fix response to array
Browse files Browse the repository at this point in the history
  • Loading branch information
erfandiakoo committed Dec 6, 2024
1 parent 003dd4b commit 9fcfe45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@ func (g *GoArpa) GetCustomerByMobile(ctx context.Context, accessToken string, co
func (g *GoArpa) GetCustomerByBusinessCode(ctx context.Context, accessToken string, cookie []*http.Cookie, businessCode string) (*GetCustomerResponse, error) {
const errMessage = "could not get customer info"

var result GetCustomerResponse
result := &GetCustomerResponse{}

resp, err := g.GetRequestWithBearerAuthWithCookie(ctx, accessToken, cookie).
SetQueryParam(constant.BusinessCodeKey, businessCode).
SetResult(&result).
SetResult(result).
Get(fmt.Sprintf("%s/%s", g.basePath, g.Config.GetCustomerEndpoint))

if err := checkForError(resp, err, errMessage); err != nil {
return nil, err
}

return &result, nil
return result, nil
}

0 comments on commit 9fcfe45

Please sign in to comment.