filter for actual alerts (not test) close #141

This commit is contained in:
Matt Walsh
2025-09-09 22:07:42 -05:00
parent cc3dbeb043
commit fa16095355

View File

@@ -71,6 +71,7 @@ class Hazards extends WeatherDisplay {
// get the forecast using centralized safe handling // get the forecast using centralized safe handling
const url = new URL('https://api.weather.gov/alerts/active'); const url = new URL('https://api.weather.gov/alerts/active');
url.searchParams.append('point', `${this.weatherParameters.latitude},${this.weatherParameters.longitude}`); url.searchParams.append('point', `${this.weatherParameters.latitude},${this.weatherParameters.longitude}`);
url.searchParams.append('status', 'actual');
const alerts = await safeJson(url, { retryCount: 3, stillWaiting: () => this.stillWaiting() }); const alerts = await safeJson(url, { retryCount: 3, stillWaiting: () => this.stillWaiting() });
if (!alerts) { if (!alerts) {