Fabrik als Provider Korrigiert
This commit is contained in:
+13
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user