feat: expand companion platform, device controls, and memoir workflows
ci / verify (push) Canceled after 0s

Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
This commit is contained in:
Codex Local
2026-10-08 10:06:44 +08:00
parent 98fb2965d0
commit bf1233d5df
861 changed files with 94614 additions and 3209 deletions
+23
View File
@@ -0,0 +1,23 @@
package httpapi
import (
"data-terminal-cloud/internal/webevents"
"net/http"
"time"
)
func WebEventHistoryHandler(service *webevents.Service) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
principal, ok := webPrincipal(w, r)
if !ok {
return
}
items, err := service.History(r.Context(), principal, time.Now().Add(-7*24*time.Hour), 200)
if err != nil {
WriteError(w, r, http.StatusInternalServerError, "INTERNAL_ERROR", "近期动态读取失败,请重试")
return
}
w.Header().Set("Cache-Control", "no-store")
WriteJSON(w, r, http.StatusOK, map[string]any{"items": items, "limit": 200, "retention_days": 7})
})
}