webapi: Export EncodeJSON, DecodeJSON

This commit is contained in:
Kleissner
2021-09-10 19:19:06 +02:00
parent 3f3e6d9df1
commit 95640fede3
4 changed files with 17 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ func apiStatus(w http.ResponseWriter, r *http.Request) {
// Instead, the core should keep a count of "active peers".
status.IsConnected = status.CountPeerList >= 2
apiEncodeJSON(w, r, status)
EncodeJSON(w, r, status)
}
type apiResponsePeerSelf struct {
@@ -56,5 +56,5 @@ func apiPeerSelf(w http.ResponseWriter, r *http.Request) {
_, publicKey := core.ExportPrivateKey()
response.PeerID = hex.EncodeToString(publicKey.SerializeCompressed())
apiEncodeJSON(w, r, response)
EncodeJSON(w, r, response)
}