Skip to content

Commit

Permalink
Remove debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Ralston committed Mar 6, 2024
1 parent 3fd621f commit 11feeaa
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions amember/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io"
"log"
"net/http"
"net/url"
"strconv"
Expand Down Expand Up @@ -79,7 +78,6 @@ func doRequest[R any](endpoint string, query url.Values) (R, error) {
if err != nil {
return zero, err
}
log.Println(pth)
req, err := http.NewRequest(http.MethodGet, pth, nil)
if err != nil {
return zero, err
Expand All @@ -102,8 +100,6 @@ func doRequest[R any](endpoint string, query url.Values) (R, error) {
return zero, err
}

log.Println("aMember Pro response: ", string(b))

var val R
err = json.Unmarshal(b, &val)
if err != nil {
Expand All @@ -112,12 +108,6 @@ func doRequest[R any](endpoint string, query url.Values) (R, error) {

return val, nil
} else {
b, err := io.ReadAll(res.Body)
if err != nil {
return zero, err
}
log.Println("aMember Pro error: ", string(b))

return zero, fmt.Errorf("http error %d %s", res.StatusCode, res.Status)
}
}

0 comments on commit 11feeaa

Please sign in to comment.