Fabrik als Provider Korrigiert

This commit is contained in:
ecki
2026-04-17 16:39:13 +02:00
parent d77d9c0c0f
commit 5510d58e5a
18 changed files with 570 additions and 22 deletions
+13 -1
View File
@@ -12,6 +12,7 @@ from app.models import TrackedEvent, WatchItem
from app.scheduler import start_scheduler
from app.schemas import (
NotificationLogRead,
ProviderStatusRead,
PurchaseUpdate,
SyncResult,
TrackedEventRead,
@@ -19,7 +20,13 @@ from app.schemas import (
WatchItemRead,
WatchItemUpdate,
)
from app.services import list_events, list_notifications, list_watch_items, run_sync
from app.services import (
list_events,
list_notifications,
list_provider_statuses,
list_watch_items,
run_sync,
)
app = FastAPI(
@@ -135,6 +142,11 @@ def get_notifications(db: Session = Depends(get_db)):
return list_notifications(db)
@app.get("/provider-statuses", response_model=list[ProviderStatusRead])
def get_provider_statuses(db: Session = Depends(get_db)):
return list_provider_statuses(db)
@app.post("/sync", response_model=SyncResult)
def trigger_sync(db: Session = Depends(get_db)):
return run_sync(db)