Files
mcma-backend/app/api/v1/__init__.py
T
Senko-san 356cd00772
Docker Build & Publish / build (push) Successful in 1m15s
Docker Build & Publish / push (push) Failing after 5s
Docker Build & Publish / Prune old image versions (push) Has been skipped
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>
2026-06-10 14:20:00 +03:00

49 lines
2.2 KiB
Python

"""Native REST API, version 1. Aggregates feature routers under ``/api/v1``."""
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.albums import router as albums_router
from app.api.v1.artists import router as artists_router
from app.api.v1.auth import router as auth_router
from app.api.v1.downloads import router as downloads_router
from app.api.v1.history import router as history_router
from app.api.v1.likes import router as likes_router
from app.api.v1.playlists import router as playlists_router
from app.api.v1.radio import router as radio_router
from app.api.v1.search import router as search_router
from app.api.v1.sources import router as sources_router
from app.api.v1.storage import router as storage_router
from app.api.v1.streaming import router as streaming_router
from app.api.v1.sync import router as sync_router
from app.api.v1.tracks import router as tracks_router
from app.api.v1.upload import router as upload_router
from app.api.v1.user_settings import router as user_settings_router
from app.api.v1.users import router as users_router
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(users_router)
api_v1_router.include_router(tracks_router)
api_v1_router.include_router(albums_router)
api_v1_router.include_router(artists_router)
api_v1_router.include_router(search_router)
api_v1_router.include_router(playlists_router)
api_v1_router.include_router(likes_router)
api_v1_router.include_router(history_router)
api_v1_router.include_router(streaming_router)
api_v1_router.include_router(sources_router)
api_v1_router.include_router(downloads_router)
api_v1_router.include_router(upload_router)
api_v1_router.include_router(radio_router)
api_v1_router.include_router(storage_router)
api_v1_router.include_router(sync_router)
api_v1_router.include_router(user_settings_router)
api_v1_router.include_router(admin_router)
__all__ = ["api_v1_router"]