HexaWetter v1.2.0: Security, Admin, Radar, UI

This commit is contained in:
TheOnlyMace
2026-06-18 23:59:08 +02:00
parent 7ba9687619
commit 3589f7fdcf
72 changed files with 695 additions and 409 deletions

View File

@@ -86,11 +86,11 @@ async def fetch_all_warnings() -> list[dict[str, Any]]:
client = get_client()
response = await client.get(DWD_WARNINGS_URL, timeout=10.0)
response.raise_for_status()
text = response.text
if text.startswith("warnWetter.loadWarnings("):
text = text[text.index("(") + 1 : text.rindex(")")]
payload = json.loads(text)
response.raise_for_status()
text = response.text
if text.startswith("warnWetter.loadWarnings("):
text = text[text.index("(") + 1 : text.rindex(")")]
payload = json.loads(text)
warnings = _flatten_warnings(payload)
await cache_set(cache_key, warnings, CACHE_TTL_WARNINGS)