Skip to content

Commit

Permalink
fix: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikRevich committed Nov 3, 2024
1 parent d2340e5 commit 0ae69ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zcncore/zauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,14 @@ func ZauthSignTxn(serverAddr string) sys.AuthorizeFunc {
return "", errors.Errorf("unexpected status code: %d, res: %s", resp.StatusCode, string(rsp))
}

d, err := io.ReadAll(resp.Body)
var d string

err = json.NewDecoder(resp.Body).Decode(&d)
if err != nil {
return "", errors.Wrap(err, "failed to read response body")
}

return string(d), nil
return d, nil
}
}

Expand Down

0 comments on commit 0ae69ed

Please sign in to comment.