Expose BanGUI version in API responses (dashboard + config)

This commit is contained in:
2026-03-19 19:19:42 +01:00
parent 80a6bac33e
commit 1cc9968d31
6 changed files with 22 additions and 3 deletions

View File

@@ -897,6 +897,7 @@ async def get_service_status(socket_path: str) -> ServiceStatusResponse:
Returns:
:class:`~app.models.config.ServiceStatusResponse`.
"""
from app import __version__ # noqa: TCH001 - expose the app release version
from app.services.health_service import probe # lazy import avoids circular dep
server_status = await probe(socket_path)
@@ -922,6 +923,7 @@ async def get_service_status(socket_path: str) -> ServiceStatusResponse:
return ServiceStatusResponse(
online=server_status.online,
version=server_status.version,
bangui_version=__version__,
jail_count=server_status.active_jails,
total_bans=server_status.total_bans,
total_failures=server_status.total_failures,