feat: customer list API
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>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
"""FastAPI layer for the yunke data-mirror viewing API.
|
||||
|
||||
Read-only HTTP surface over the mirrored DB. Public entrypoint is
|
||||
:mod:`app.api.main` (``app = FastAPI(...)``). Routers live under
|
||||
:mod:`app.api.routers` and share dependencies from :mod:`app.api.deps`.
|
||||
"""
|
||||
Reference in New Issue
Block a user