package api import "net/http" func (s *Server) handleAdminIndex(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodGet && r.Method != http.MethodHead { writeErrorJSON(w, http.StatusMethodNotAllowed, "method_not_allowed", "method not allowed") return } body := AdminIndexResponse{ Service: "bat-api", Panel: "admin", Status: "reserved", Links: []string{ "/healthz", "/readyz", "/v1/bootstrap", "/v1/release", "/v1/resources", "/openapi.yaml", }, } if r.Method == http.MethodHead { w.Header().Set("Cache-Control", "no-store") w.WriteHeader(http.StatusOK) return } writeNoStoreJSON(w, http.StatusOK, body) }