14 lines
370 B
Python
14 lines
370 B
Python
from fastapi import APIRouter
|
|
|
|
from app.models import RuntimeResponse
|
|
from app.services.runtime_probe import build_runtime
|
|
from app.services.systemd_manager import SystemdManager
|
|
|
|
router = APIRouter(tags=['runtime'])
|
|
manager = SystemdManager()
|
|
|
|
|
|
@router.get('/runtime', response_model=RuntimeResponse)
|
|
def runtime() -> RuntimeResponse:
|
|
return build_runtime(manager)
|