v0.1.26: версия в /health, admin health и UI; ldflags VERSION; Makefile build фикс

This commit is contained in:
“Naeel”
2026-08-14 08:19:14 +04:00
parent 166baa9a98
commit 3a105de05b
6 changed files with 31 additions and 6 deletions
+3
View File
@@ -727,6 +727,7 @@ func jsonErr(w http.ResponseWriter, code int, msg string) {
// adminHealthDetail — ответ GET /admin/health
type adminHealthDetail struct {
Status string `json:"status"`
Version string `json:"version"`
TenantCount int `json:"tenant_count"`
QueueCount int `json:"queue_count"`
MessageCount int `json:"message_count"`
@@ -750,6 +751,7 @@ func (h *Handler) detailedHealth(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(adminHealthDetail{
Status: "ok",
Version: models.Version,
TenantCount: 1,
QueueCount: queueCount,
MessageCount: msgCount,
@@ -768,6 +770,7 @@ func (h *Handler) detailedHealth(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(adminHealthDetail{
Status: "ok",
Version: models.Version,
TenantCount: len(tenants),
QueueCount: queueCount,
MessageCount: msgCount,