Initial commit
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user