Initial commit

This commit is contained in:
shahzeydyfah
2024-02-15 00:17:51 +03:30
commit 4b0396466d
111 changed files with 6296 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from pymongo.collection import Collection
from config import conf
from core.service.mongo_db import use_collection
def get_auth_db():
return conf.server.is_prod and conf.database.get('mongo').production.db or conf.database.get(
'mongo').dev.db
def use_auth_collection(collection: str) -> Collection:
print("pppppppppppppppppppp")
return use_collection(collection, get_auth_db(), connection_name='mongo_auth')