Ali2206 commited on
Commit
88e4026
·
verified ·
1 Parent(s): 120a1a5

Update db/mongo.py

Browse files
Files changed (1) hide show
  1. db/mongo.py +7 -1
db/mongo.py CHANGED
@@ -2,6 +2,12 @@ import certifi
2
  from motor.motor_asyncio import AsyncIOMotorClient
3
  from core.config import MONGO_URI
4
 
 
5
  client = AsyncIOMotorClient(MONGO_URI, tls=True, tlsCAFile=certifi.where())
 
 
6
  db = client["cps_db"]
7
- users_collection = db["users"]
 
 
 
 
2
  from motor.motor_asyncio import AsyncIOMotorClient
3
  from core.config import MONGO_URI
4
 
5
+ # Create MongoDB client with TLS certificate
6
  client = AsyncIOMotorClient(MONGO_URI, tls=True, tlsCAFile=certifi.where())
7
+
8
+ # Access main database
9
  db = client["cps_db"]
10
+
11
+ # Collections
12
+ users_collection = db["users"]
13
+ patients_collection = db["patients"]