feat(админка): система — каналы и история

This commit is contained in:
anor
2026-11-06 23:07:59 +10:00
parent 27a21cfec1
commit a47e948d6e
9 changed files with 232 additions and 1 deletions
+6
View File
@@ -754,6 +754,12 @@ def admin_verify_telegram(email: str, telegram: str) -> None:
"WHERE email = ?", (telegram, name, time.time(), email.lower().strip()))
def list_app_settings() -> list[dict]:
with _conn() as conn:
rows = conn.execute("SELECT key, value FROM app_settings ORDER BY key").fetchall()
return [dict(r) for r in rows if not str(r["key"]).startswith("_")]
def get_app_setting(key: str, default: str = "") -> str:
"""Глобальная настройка из БД (agent_killswitch и т.п.)."""
with _conn() as conn: