Add registration configuration fields (fixes registration endpoint)

This commit is contained in:
2025-10-07 02:37:36 -04:00
parent d801715dab
commit 316358a82a
2 changed files with 6 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ cat: str = "/etc/vona/cat.jpg"
server_name: str = ""
signing_key: str = ""
support: dict = {"contacts": []}
users_can_register: bool = False
_CONFIG_PATH = Path("/etc/vona/config.toml")
@@ -112,6 +113,10 @@ def _apply_config(cfg: dict) -> None:
support_obj["contacts"].append(contact)
else:
_warn("No support contacts are defined")
if "enable_registration" in cfg:
users_can_register = cfg["enable_registration"]
support = support_obj
print("[INFO] Configuration file was valid")