Fix API regressions and refresh project docs

This commit is contained in:
Artem Kokos
2026-05-15 23:12:28 +07:00
parent 654f64bb90
commit 13fba2fa44
19 changed files with 3258 additions and 964 deletions

View File

@@ -8,6 +8,10 @@ from app.api.deps import require_admin
router = APIRouter(dependencies=[Depends(require_admin)])
def _is_summary_command_event(action: str) -> bool:
return not action.endswith("_requested")
@router.get("/summary")
async def get_summary(days: int = Query(default=7, ge=1, le=365)):
"""
@@ -33,6 +37,9 @@ async def get_summary(days: int = Query(default=7, ge=1, le=365)):
last_on = {}
for ev in events:
if not _is_summary_command_event(ev.action):
continue
tid = ev.target_id
if tid not in stats:
stats[tid] = {