Clear up one TODO and update comments on some more

This commit is contained in:
Ian Renton
2026-06-20 08:33:00 +01:00
parent 20966cc7cf
commit 1e42c69b78
3 changed files with 11 additions and 10 deletions

View File

@@ -14,15 +14,14 @@ with open("config.yml") as f:
config = yaml.safe_load(f)
logging.info("Loaded config.")
# TODO load other keys with config.get(key, default) instead of config[key]
BASE_URL = config["base-url"]
MAX_SPOT_AGE = config["max-spot-age-sec"]
MAX_ALERT_AGE = config["max-alert-age-sec"]
SERVER_OWNER_CALLSIGN = config["server-owner-callsign"]
WEB_SERVER_PORT = config["web-server-port"]
ALLOW_SPOTTING = config["allow-spotting"]
BASE_URL = config.get("base-url", "http://localhost:8080")
MAX_SPOT_AGE = config.get("max-spot-age-sec", 3600)
MAX_ALERT_AGE = config.get("max-alert-age-sec", 604800)
SERVER_OWNER_CALLSIGN = config.get("server-owner-callsign", "N0CALL")
WEB_SERVER_PORT = config.get("web-server-port", 8080)
ALLOW_SPOTTING = config.get("allow-spotting", True)
ALLOW_UPSTREAM_SPOTTING = config.get("allow-upstream-spotting", True)
WEB_UI_OPTIONS = config["web-ui-options"]
WEB_UI_OPTIONS = config.get("web-ui-options", {})
API_ONLY_MODE = config.get("api-only-mode", False)
RECAPTCHA_SECRET_KEY = config.get("recaptcha-secret-key", "")
RECAPTCHA_SITE_KEY = config.get("recaptcha-site-key", "")