Files
QuestionProject/ai_knowledge_base_v2/apps/backend/app/api/pagination.py

8 lines
237 B
Python

from __future__ import annotations
from typing import Any
def page_result(items: list[Any], *, total: int, page: int, page_size: int) -> dict[str, Any]:
return {"items": items, "total": total, "page": page, "pageSize": page_size}