Merge branch 'develop'

This commit is contained in:
rene 2026-05-14 17:01:46 +02:00
commit cd3e3bdbf6

View file

@ -799,7 +799,10 @@ async def get_analytics(user=Depends(require_mod)):
site_id = os.getenv("UMAMI_SITE_ID", "") site_id = os.getenv("UMAMI_SITE_ID", "")
if not url or not site_id: if not url or not site_id:
raise HTTPException(503, "Umami nicht konfiguriert.") raise HTTPException(503, "Umami nicht konfiguriert.")
token = await _umami_auth() try:
token = await _umami_auth()
except Exception as e:
raise HTTPException(503, f"Umami-Login fehlgeschlagen: Bitte UMAMI_USERNAME und UMAMI_PASSWORD in .env prüfen. ({e})")
headers = {"Authorization": f"Bearer {token}"} headers = {"Authorization": f"Bearer {token}"}
now = datetime.now(_TZ) now = datetime.now(_TZ)