summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2025-10-10 14:38:54 +0300
committerA Farzat <a@farzat.xyz>2025-10-10 14:38:54 +0300
commit5bbd9bda00e861f72f42965d407ada3ea6f5760e (patch)
treee4455504675f0a04d4a021584a00cb2f1301f999 /components
parent03d67a3daeec809cd07ecd4e925b363b0504bec5 (diff)
downloadcsca5028-5bbd9bda00e861f72f42965d407ada3ea6f5760e.tar.gz
csca5028-5bbd9bda00e861f72f42965d407ada3ea6f5760e.zip
Make database configurable through env vars
Diffstat (limited to 'components')
-rw-r--r--components/database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/database.py b/components/database.py
index f196fe1..a65a4c5 100644
--- a/components/database.py
+++ b/components/database.py
@@ -14,7 +14,7 @@ client: MongoClient[Any] = MongoClient(
"mongodb://%s:%s@localhost/admin" % (getenv('MONGO_USER'), getenv('MONGO_PASS')),
tz_aware=True,
)
-database: Database[Any] = client.get_database("youtube")
+database: Database[Any] = client.get_database(getenv('YT_DB') or "youtube")
subscriptions: Collection[SubsDict] = database.get_collection("subscriptions")
users: Collection[UserDict] = database.get_collection("users")