- Kanäle SMTP (HTML-Mail mit Logos als CID-Anhang) und Apprise, beide blockierenden Bibliotheken laufen in einem Thread - Vier Anlässe: Fälligkeiten im Vorlauf, Kündigungsfristen in drei Stufen, überschrittene Budgets je Monat, Vertragsverlängerungen im Folgemonat - APScheduler im Anwendungsprozess, täglich 07:00 Europe/Berlin, räumt zugleich abgelaufene Sitzungen auf - Duplikatsschutz über den Zieltag statt den Versandtag; fehlgeschlagener Versand wird beim nächsten Lauf erneut versucht - Endpunkte für Regeln, Protokoll, Testversand und sofortigen Lauf - Einstellungsseite mit Einrichtungsstand, Regelpflege und Protokoll - 25 neue Backend-Tests (260 gesamt), 9 neue Frontend-Tests (74 gesamt) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
"""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,
|
|
export,
|
|
logos,
|
|
me,
|
|
merchants,
|
|
notifications,
|
|
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(logos.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)
|
|
protected.include_router(export.router)
|
|
protected.include_router(notifications.router)
|
|
|
|
api_router.include_router(protected)
|