新增消息的储存和查看接口

This commit is contained in:
ChengCan
2026-03-26 10:34:18 +08:00
parent f9ca4a32a3
commit 7371848a6b
4 changed files with 422 additions and 0 deletions

View File

@@ -6,11 +6,13 @@ try:
# For module mode: `uvicorn app.main:app`
from app.db import check_db_connection, close_db_engine
from app.routers.health import router as health_router
from app.routers.messages import router as messages_router
from app.settings import settings
except ModuleNotFoundError:
# For script mode: `python app/main.py` or VS Code "Run Python File"
from db import check_db_connection, close_db_engine
from routers.health import router as health_router
from routers.messages import router as messages_router
from settings import settings
@@ -30,6 +32,7 @@ def create_app() -> FastAPI:
close_db_engine()
app.include_router(health_router)
app.include_router(messages_router)
return app