fix(api): валидировать {namespace} во всех эндпоинтах (было только в POST) + регрессионные тесты

This commit is contained in:
Repinoid
2026-10-11 20:26:30 +03:00
parent 4c24c6351c
commit 6b9f397746
4 changed files with 125 additions and 17 deletions
+4 -1
View File
@@ -17,7 +17,10 @@ func (h *Handler) ListIoTTelemetry(w http.ResponseWriter, r *http.Request) {
return
}
ns := pathVar(r, "namespace")
ns, ok := requireNamespace(w, r)
if !ok {
return
}
deviceID := r.URL.Query().Get("device_id")
limit := 50
if ls := r.URL.Query().Get("limit"); ls != "" {