15 lines
483 B
Python
15 lines
483 B
Python
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from backend.app.api.schemas import HistoryListResponse
|
|
from backend.app.dependencies import get_history_service
|
|
from backend.app.services.history_service import HistoryService
|
|
|
|
router = APIRouter(prefix="/history")
|
|
|
|
|
|
@router.get("", response_model=HistoryListResponse)
|
|
async def list_history(service: HistoryService = Depends(get_history_service)) -> HistoryListResponse:
|
|
return service.list_history()
|