feat: expose signed platform health status

This commit is contained in:
Codex Local
2026-08-26 21:15:03 +08:00
parent 1e12d329dc
commit 47ef596d3b
30 changed files with 811 additions and 26 deletions
+20
View File
@@ -10,6 +10,26 @@ import (
"data-terminal-cloud/internal/idempotency"
)
func GetOpsPlatformHealthHandler(service *diagnostics.Service) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
principal, ok := webPrincipal(w, r)
if !ok {
return
}
tenantID, ok := opsTenantHeader(w, r)
if !ok {
return
}
item, err := service.GetLatestPlatformHealth(r.Context(), principal, tenantID)
if err != nil {
writeDiagnosticError(w, r, err)
return
}
w.Header().Set("Cache-Control", "no-store")
WriteJSON(w, r, http.StatusOK, item)
})
}
func ListOpsIntegrationIssuesHandler(service *diagnostics.Service) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
principal, ok := webPrincipal(w, r)