Skip to content

Commit

Permalink
Merge pull request #1 from tmus/dev
Browse files Browse the repository at this point in the history
Fix ping method to use `ping/whoami` endpoint
  • Loading branch information
tmus authored Jun 11, 2019
2 parents 179afaa + 892f3e9 commit 914cc2b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions monzo.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ func NewClient(token string) *Client {

// Ping attempts to connect to the Monzo API using the given
// client.
//
// No "ping" endpoint currently exists at Monzo, so for now
// this simply queries the /accounts endpoint.
func (c *Client) Ping() error {
req, err := c.NewRequest(http.MethodGet, "accounts", nil)
req, err := c.NewRequest(http.MethodGet, "ping/whoami", nil)
if err != nil {
return err
}
Expand Down

0 comments on commit 914cc2b

Please sign in to comment.