Справочник участников M2M: выгрузка в JSON и XML

На странице /admin/handbook добавлены кнопки «JSON» и «XML» — скачивание
сохранённого справочника участников (readHandbook: от НРД #M2MTH, копия с
сервера лицензий или встроенный снимок) файлом. JSON отдаётся как есть с
отступами, XML формируется из плоских записей. Маршруты /admin/handbook/
export.json и export.xml под админ-авторизацией.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
fontvielle
2026-10-14 18:05:54 +03:00
parent a81c214427
commit 8cdf1e0ed6
3 changed files with 93 additions and 0 deletions
+4
View File
@@ -566,6 +566,10 @@ func RegisterAdmin(mux *http.ServeMux, svc *Service, rc *RuntimeConfig, getOpts
a.renderClaim(w, r, svc, id)
case p == "status":
a.renderStatus(w, r, getOpts())
case p == "handbook/export.json":
a.exportHandbook(w, "json")
case p == "handbook/export.xml":
a.exportHandbook(w, "xml")
case p == "handbook":
a.renderHandbook(w, r)
case p == "help":