v0.2.1! Adds instant Hazard List updates after hazard sync
Some checks are pending
build-docker / Build Image (push) Waiting to run

This commit is contained in:
mrkmntal 2026-04-19 13:50:02 -04:00
commit dbb32fd2f9
9 changed files with 362 additions and 5 deletions

View file

@ -290,13 +290,19 @@ class Hazards extends WeatherDisplay {
}));
// Send to backend
await fetch(withBasePath('api/hazard-history'), {
const response = await fetch(withBasePath('api/hazard-history'), {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ location, locationKey, hazards }),
});
if (!response.ok) {
throw new Error(`Hazard history sync failed with status ${response.status}`);
}
window.dispatchEvent(new CustomEvent('hazard-history-updated'));
} catch (error) {
// Silently fail - hazard history is non-critical
if (debugFlag('verbose-failures')) {