From 5bbd9bda00e861f72f42965d407ada3ea6f5760e Mon Sep 17 00:00:00 2001 From: A Farzat Date: Fri, 10 Oct 2025 14:38:54 +0300 Subject: Make database configurable through env vars --- components/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v1.2.3-70-g09d2