Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return list
+@router.get("/{list}/history")
+def get_list_history(
+ list = fastapi.Depends(get_list_from_path),
+ limit: int = 10,
+ ):
+ # Return the history as a dictionary
+ return {
+ e.ts : {
+ "domains_added" : e.domains_added,
+ "domains_removed" : e.domains_removed,
+ } for e in list.get_history(limit=limit)
+ }
+
@router.get("/{list}/sources")
def get_list_sources(list = fastapi.Depends(get_list_from_path)) -> typing.List[sources.Source]:
return list.sources