apps-l7cal6/endpoints/whatsapp.get.py
2025-03-25 13:38:06 +00:00

30 lines
705 B
Python

from fastapi import APIRouter
router = APIRouter()
migrations = [
{
"id": "001",
"name": "initial_schema",
"status": "completed",
"timestamp": "2024-01-01T00:00:00Z"
},
{
"id": "002",
"name": "add_user_table",
"status": "completed",
"timestamp": "2024-01-02T00:00:00Z"
}
]
@router.get("/whatsapp")
async def get_migrations():
"""Get database migration history"""
return {
"message": "Migration history retrieved",
"migrations": migrations,
"status": {
"total": len(migrations),
"completed": len([m for m in migrations if m["status"] == "completed"])
}
}