diff --git a/internal/api/accounts.go b/internal/api/accounts.go index 7bb4e7e..168c707 100644 --- a/internal/api/accounts.go +++ b/internal/api/accounts.go @@ -13,7 +13,7 @@ import ( func (a *api) upsertAccountHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { acct := &data.Account{} - if err := json.NewDecoder(r.Body).Decode(a); err != nil { + if err := json.NewDecoder(r.Body).Decode(acct); err != nil { a.logger.WithFields(logrus.Fields{ "err": err, }).Info("failed to parse request json") diff --git a/internal/reddit/client.go b/internal/reddit/client.go index f47b7d4..c53beaf 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -117,7 +117,6 @@ func (rac *AuthenticatedClient) request(r *Request) ([]byte, error) { } if resp.StatusCode != 200 { rac.statsd.Incr("reddit.api.errors", r.tags, 0.1) - fmt.Println(string(bb)) // TODO remove // Try to parse a json error. Otherwise we generate a generic one rerr := &Error{} if jerr := json.Unmarshal(bb, rerr); jerr != nil {