доработка текущего времени raspberry на экране
This commit is contained in:
@@ -42,6 +42,8 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) {
|
||||
status = "Нет связи"
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
writeJSON(w, map[string]any{
|
||||
"status": status,
|
||||
"uptime_sec": time.Since(a.startTime).Seconds(),
|
||||
@@ -50,6 +52,7 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) {
|
||||
"has_data": ok,
|
||||
"latest": latest,
|
||||
"stats": a.buf.Stats(),
|
||||
"server_time": now.Format("02.01.2006 15:04"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user