- simple-icons als kompakter Index im Repository (3.459 Marken, 2 MB gzip),
erzeugt von scripts/vendor_simple_icons.py bzw. `make vendor-icons`
- logo.dev und Brandfetch als optionale Adapter, ohne Schlüssel übersprungen
- Favicon-Fallback und generierter Buchstaben-Avatar als Garantie
- Bei eindeutigem Offline-Treffer unterbleiben Anfragen nach außen komplett
- Cache im Dateisystem nach SHA-256, Auslieferung nur über /api/logos/{id}
mit immutable-Header und ETag
- Markenfarbe aus SVG-Fills bzw. per k-Means (k=4) über 64x64 Pixel, dazu eine
aufgehellte Variante mit mindestens 4,5:1 Kontrast auf dunklem Grund
- Kandidatensuche mit Vorauswahl, Auswahl, Upload und Zurücksetzen
- Bildtyp wird nur noch am Inhalt bestimmt, nicht an der gemeldeten Kopfzeile
- 60 neue Tests, insgesamt 208 grün
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
48 lines
1.3 KiB
Python
48 lines
1.3 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,
|
|
logos,
|
|
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(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)
|
|
|
|
api_router.include_router(protected)
|