fix(health): expose health endpoints under /api/v1
The webui connection ping requests ${apiBase}/health where apiBase is
/api/v1, so it was hitting /api/v1/health — a route that never existed
(health was mounted only at the root). Mount health_router under the v1
aggregator too; root /health stays in main.py for compose/nginx probes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
|
from app.api.health import router as health_router
|
||||||
from app.api.v1.admin import router as admin_router
|
from app.api.v1.admin import router as admin_router
|
||||||
from app.api.v1.albums import router as albums_router
|
from app.api.v1.albums import router as albums_router
|
||||||
from app.api.v1.artists import router as artists_router
|
from app.api.v1.artists import router as artists_router
|
||||||
@@ -22,6 +23,9 @@ from app.api.v1.user_settings import router as user_settings_router
|
|||||||
from app.api.v1.users import router as users_router
|
from app.api.v1.users import router as users_router
|
||||||
|
|
||||||
api_v1_router = APIRouter(prefix="/api/v1")
|
api_v1_router = APIRouter(prefix="/api/v1")
|
||||||
|
# Also expose health under /api/v1 (root /health stays in main.py for compose/nginx
|
||||||
|
# probes); the webui pings ${apiBase}/health and apiBase is /api/v1.
|
||||||
|
api_v1_router.include_router(health_router)
|
||||||
api_v1_router.include_router(auth_router)
|
api_v1_router.include_router(auth_router)
|
||||||
api_v1_router.include_router(users_router)
|
api_v1_router.include_router(users_router)
|
||||||
api_v1_router.include_router(tracks_router)
|
api_v1_router.include_router(tracks_router)
|
||||||
|
|||||||
Reference in New Issue
Block a user