feat: expose signed platform health status
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user