diff options
| author | A Farzat <a@farzat.xyz> | 2025-10-10 14:38:54 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2025-10-10 14:38:54 +0300 |
| commit | 5bbd9bda00e861f72f42965d407ada3ea6f5760e (patch) | |
| tree | e4455504675f0a04d4a021584a00cb2f1301f999 | |
| parent | 03d67a3daeec809cd07ecd4e925b363b0504bec5 (diff) | |
| download | csca5028-5bbd9bda00e861f72f42965d407ada3ea6f5760e.tar.gz csca5028-5bbd9bda00e861f72f42965d407ada3ea6f5760e.zip | |
Make database configurable through env vars
| -rw-r--r-- | components/database.py | 2 |
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") |
