First API implementation

This commit is contained in:
Nikita Tyukalov, ASUS, Linux
2026-08-29 17:24:39 +03:00
parent 28ef360d5f
commit 8094aaab10
6 changed files with 278 additions and 31 deletions

View File

@@ -11,7 +11,11 @@ import util
DEFAULT_CONFIG = {
"matrix_homeserver": "https://matrix.domain.net",
"matrix_user": "short_username",
"store_dir": "session_storage"
"store_dir": "session_storage",
"web_ip": "0.0.0.0",
"web_port": 4980,
"fails_to_ban": 50,
"ban_duration": 600
}
@@ -50,4 +54,5 @@ async def load_config(path: str = "config.json") -> AppConfig | None:
cfg = AppConfig(**j)
return cfg
except:
traceback.print_exc()
return None