add Updateboltcard()

This commit is contained in:
Peter Rounce 2023-02-22 08:11:52 +00:00
parent 0300a5aa30
commit dadc76f0d3
8 changed files with 66 additions and 49 deletions

10
ping.go
View file

@ -5,16 +5,8 @@ import (
)
func external_ping(w http.ResponseWriter, req *http.Request) {
ping(w, "external API")
}
func internal_ping(w http.ResponseWriter, req *http.Request) {
ping(w, "internal API")
}
func ping(w http.ResponseWriter, message string) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
jsonData := []byte(`{"status":"OK","pong":"` + message + `"}`)
jsonData := []byte(`{"status":"OK","pong":"external API"}`)
w.Write(jsonData)
}