diff --git a/pyproject.toml b/pyproject.toml index a8bb14b..848445a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,6 @@ dependencies = [ "pynacl (>=1.6.0,<2.0.0)", "flask[async] (>=3.1.2,<4.0.0)", "resolvematrix @ git+https://codeberg.org/timedout/resolvematrix.git", - "pycouchdb (>=1.16.0,<2.0.0)", ] authors = [ diff --git a/vona/config/__init__.py b/vona/config/__init__.py index 57d5326..ae97b58 100644 --- a/vona/config/__init__.py +++ b/vona/config/__init__.py @@ -1,4 +1,3 @@ -from types import SimpleNamespace from pathlib import Path import tomllib import os @@ -14,11 +13,6 @@ server_name: str = "" signing_key: str = "" support: dict = {"contacts": []} -db = SimpleNamespace( - name="vona", - url="", -) - _CONFIG_PATH = Path(os.getenv("VONA_CONFIG", "/etc/vona/config.toml")) @@ -122,20 +116,6 @@ def _apply_config(cfg: dict) -> None: if "enable_registration" in cfg and isinstance(cfg["enable_registration"], bool): users_can_register = cfg["enable_registration"] - if "db" in cfg and isinstance(cfg["db"], dict): - _db = cfg["db"] - if "url" in _db: - db.url = str(_db["url"]) - else: - _fatal("No DB URL provided") - - if "name" in _db: - db.name = str(_db["name"]) - else: - _warn("No DB name provided, defaulting to `vona`") - else: - _fatal("NO DB provided") - print("[INFO] Configuration file was valid") diff --git a/vona/db/__init__.py b/vona/db/__init__.py deleted file mode 100644 index 7db46c3..0000000 --- a/vona/db/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -import vona.config as config -import pycouchdb -import os - -# NOTE: We don't do anything with the DB currently. - -try: - server = pycouchdb.Server(config.db.url) -except Exception as e: - print(f"[FATL] Could not connect to DB: {e}") - os._exit(1) - -print(f"[INFO] CouchDB version {server.info()['version']}")