Backend totalmente hecho con mongodb, añadida la funcionalidad de usuarios con historial

This commit is contained in:
Mireya Cueto Garrido
2026-03-27 11:16:44 +01:00
parent 57b64b4f1e
commit e19e971cd6
15 changed files with 252 additions and 89 deletions
+12
View File
@@ -0,0 +1,12 @@
from fastapi import APIRouter
from api.database.mongodb import db
router = APIRouter()
@router.get("/test-mongo")
async def test_mongo():
try:
await db.command("ping")
return {"status": "ok", "message": "Conexión a MongoDB correcta"}
except Exception as e:
return {"status": "error", "message": str(e)}