"""Sammelrouter für alle /api-Endpunkte. Alle Routen außer `/api/auth/*`, `/api/me` und den Systemendpunkten erfordern eine gültige Anmeldung **und** einen abgeschlossenen Passwortwechsel. """ from fastapi import APIRouter, Depends from app.api.deps import get_active_user from app.api.routes import ( accounts, auth, budgets, categories, me, merchants, occurrences, recurrences, reports, savings_goals, system, transactions, ) api_router = APIRouter(prefix="/api") # Ohne Authentifizierung erreichbar. api_router.include_router(system.router) api_router.include_router(auth.router) api_router.include_router(me.router) # Alles Weitere nur für angemeldete Benutzer. protected = APIRouter(dependencies=[Depends(get_active_user)]) protected.include_router(accounts.router) protected.include_router(categories.router) protected.include_router(merchants.router) protected.include_router(recurrences.router) protected.include_router(occurrences.router) protected.include_router(transactions.router) protected.include_router(budgets.router) protected.include_router(budgets.templates) protected.include_router(savings_goals.router) protected.include_router(reports.router) api_router.include_router(protected)