1e0467b40f
Minimal read-only FastAPI surface over the mirrored DB: - GET /api/customers with pagination (page/page_size) and optional channel / owner_account_id / department_id filters, ordered by last_chat_time desc (nulls last) then friend_id. - GET /api/health liveness probe. - Pydantic v2 CustomerOut + generic Page[T] envelope. - CORS configured permissively for the local frontend. - Tests override get_session to an in-memory async SQLite session (StaticPool) and drive the app via httpx ASGITransport. Co-Authored-By: Claude <noreply@anthropic.com>
11 lines
321 B
Python
11 lines
321 B
Python
"""FastAPI dependencies for the yunke data-mirror API.
|
|
|
|
Re-exports :func:`app.db.base.get_session` so route code (and tests) depend on
|
|
a single API-layer seam. Tests override ``app.api.deps.get_session`` to swap in
|
|
an isolated in-memory SQLite session.
|
|
"""
|
|
|
|
from app.db.base import get_session
|
|
|
|
__all__ = ["get_session"]
|