Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ password=os.environ.get("MONGODB")
|
|
| 17 |
|
| 18 |
def init_database():
|
| 19 |
uri = f"mongodb+srv://new-user:{password}@cluster0.xb2urf6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
|
| 20 |
-
client = MongoClient(uri,
|
| 21 |
db = client["elo_ratings"]
|
| 22 |
collection = db["elo_ratings"]
|
| 23 |
return collection
|
|
|
|
| 17 |
|
| 18 |
def init_database():
|
| 19 |
uri = f"mongodb+srv://new-user:{password}@cluster0.xb2urf6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
|
| 20 |
+
client = MongoClient(uri,server_api=ServerApi('1'))
|
| 21 |
db = client["elo_ratings"]
|
| 22 |
collection = db["elo_ratings"]
|
| 23 |
return collection
|