feat: logging toegevoegd
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
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()
|
||||
@@ -149,3 +149,20 @@ class BookmarkListResponse(BaseModel):
|
||||
|
||||
class BookmarkDeleteResponse(BaseModel):
|
||||
id: int
|
||||
|
||||
|
||||
class HistoryItem(BaseModel):
|
||||
id: str
|
||||
operation: str
|
||||
status: str
|
||||
source: str | None = None
|
||||
destination: str | None = None
|
||||
path: str | None = None
|
||||
error_code: str | None = None
|
||||
error_message: str | None = None
|
||||
created_at: str
|
||||
finished_at: str | None = None
|
||||
|
||||
|
||||
class HistoryListResponse(BaseModel):
|
||||
items: list[HistoryItem]
|
||||
|
||||
Reference in New Issue
Block a user