Skip to content

Commit

Permalink
Merge pull request #173 from BuxOrg/fix/bux-408-admin-requests
Browse files Browse the repository at this point in the history
fix(BUX-408): admin query requests are failing because of nil reference and invalid http method
  • Loading branch information
mergify[bot] authored Dec 20, 2023
2 parents 62b82cc + 0e07e25 commit 07fecdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions buxclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func New(opts ...ClientOps) (*BuxClient, error) {
return nil, err
}

client.TransportService = client.transport

return client, nil
}

Expand Down
2 changes: 1 addition & 1 deletion transports/http_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (h *TransportHTTP) adminCount(ctx context.Context, conditions map[string]in

var count int64
if err := h.doHTTPRequest(
ctx, http.MethodGet, path, jsonStr, h.xPriv, true, &count,
ctx, http.MethodPost, path, jsonStr, h.xPriv, true, &count,
); err != nil {
return 0, err
}
Expand Down

0 comments on commit 07fecdf

Please sign in to comment.