Refactor apiTest into Status.go

This commit is contained in:
Kleissner
2021-09-15 16:29:26 +02:00
parent 16e9c0e67f
commit 67bf27a4af
2 changed files with 14 additions and 11 deletions

View File

@@ -13,6 +13,11 @@ import (
"github.com/PeernetOfficial/core"
)
func apiTest(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("ok"))
}
type apiResponseStatus struct {
Status int `json:"status"` // Status code: 0 = Ok.
IsConnected bool `json:"isconnected"` // Whether connected to Peernet.