Spaces:
Runtime error
Runtime error
Commit
·
f7275e0
1
Parent(s):
7bf5a3a
fix
Browse files- db/mongoDB.py +1 -1
- main.py +3 -1
db/mongoDB.py
CHANGED
@@ -65,7 +65,7 @@ async def connect_to_mongo():
|
|
65 |
|
66 |
|
67 |
logger.info("✅ MongoDB connection successful and collections are ready.")
|
68 |
-
|
69 |
|
70 |
except ConnectionFailure as e:
|
71 |
logger.error(f"❌ Failed to connect to MongoDB: Connection Failure. Check your URI and network access rules in Atlas. Error: {e}", exc_info=True)
|
|
|
65 |
|
66 |
|
67 |
logger.info("✅ MongoDB connection successful and collections are ready.")
|
68 |
+
|
69 |
|
70 |
except ConnectionFailure as e:
|
71 |
logger.error(f"❌ Failed to connect to MongoDB: Connection Failure. Check your URI and network access rules in Atlas. Error: {e}", exc_info=True)
|
main.py
CHANGED
@@ -62,7 +62,9 @@ app = FastAPI(
|
|
62 |
title="JuriBot API",
|
63 |
version="2.0",
|
64 |
description="Backend API cho Trợ lý Pháp luật JuriBot",
|
65 |
-
lifespan=lifespan
|
|
|
|
|
66 |
)
|
67 |
|
68 |
|
|
|
62 |
title="JuriBot API",
|
63 |
version="2.0",
|
64 |
description="Backend API cho Trợ lý Pháp luật JuriBot",
|
65 |
+
lifespan=lifespan,
|
66 |
+
docs_url="/api/docs", # Đặt đường dẫn cho Swagger UI
|
67 |
+
redoc_url="/api/redoc", # Đặt đường dẫn cho ReDoc UI
|
68 |
)
|
69 |
|
70 |
|