add Updateboltcard()
This commit is contained in:
parent
0300a5aa30
commit
dadc76f0d3
8 changed files with 66 additions and 49 deletions
10
ping.go
10
ping.go
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue