feat: show update service status in UI
This commit is contained in:
@ -26,6 +26,7 @@ from backend.models import (
|
||||
UpdateActionResponse,
|
||||
UpdateCheckResponse,
|
||||
UpdateLogEntry,
|
||||
UpdateServiceStatus,
|
||||
UpdateStatus,
|
||||
UserStatus,
|
||||
)
|
||||
@ -314,6 +315,12 @@ def update_logs(settings: Settings = Depends(get_settings), limit: int = 200) ->
|
||||
) from exc
|
||||
|
||||
|
||||
@app.get("/update/service-status", response_model=UpdateServiceStatus, dependencies=[Depends(get_current_admin)])
|
||||
def update_service_status(settings: Settings = Depends(get_settings)) -> UpdateServiceStatus:
|
||||
data = update.get_service_status(settings)
|
||||
return UpdateServiceStatus(**data)
|
||||
|
||||
|
||||
@app.get("/", response_class=HTMLResponse)
|
||||
@app.get("/login", response_class=HTMLResponse)
|
||||
@app.get("/dashboard", response_class=HTMLResponse)
|
||||
|
||||
Reference in New Issue
Block a user