refactor: flatten repository structure to root and archive research notes

This commit is contained in:
OpenClaw Agent
2026-09-22 03:41:27 +08:00
parent ae0becffec
commit 1a7658b1f7
40 changed files with 0 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
package api
import (
"encoding/json"
"net/http"
)
type healthResponse struct {
Status string `json:"status"`
Version string `json:"version"`
}
var Version = "dev"
func (s *Server) health(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet && r.Method != http.MethodHead {
w.Header().Set("Allow", "GET, HEAD")
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Header().Set("Cache-Control", "no-store")
_ = json.NewEncoder(w).Encode(healthResponse{Status: "ok", Version: Version})
}