Merge branch 'NovaOSS:main' into main

This commit is contained in:
Game_Time 2023-08-19 19:26:50 +05:00 committed by GitHub
commit e1d9bf042f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ UA_SIMPLIFY = {
## MONGODB Setup ## MONGODB Setup
conn = AsyncIOMotorClient(os.getenv('MONGO_URI')) conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
async def _get_collection(collection_name: str): async def _get_collection(collection_name: str):
return conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name] return conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]

View file

@ -23,7 +23,7 @@ class StatsManager:
""" """
def __init__(self): def __init__(self):
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI')) self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
async def _get_collection(self, collection_name: str): async def _get_collection(self, collection_name: str):
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name] return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]

View file

@ -35,7 +35,7 @@ class UserManager:
""" """
def __init__(self): def __init__(self):
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI')) self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
async def _get_collection(self, collection_name: str): async def _get_collection(self, collection_name: str):
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name] return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]