remove limit for alert endpoint due to recent api change

This commit is contained in:
Matt Walsh
2025-05-23 15:43:58 -05:00
parent 4666878250
commit bc77a1891c

View File

@@ -39,7 +39,6 @@ class Hazards extends WeatherDisplay {
// get the forecast
const url = new URL('https://api.weather.gov/alerts/active');
url.searchParams.append('point', `${this.weatherParameters.latitude},${this.weatherParameters.longitude}`);
url.searchParams.append('limit', 5);
const alerts = await json(url, { retryCount: 3, stillWaiting: () => this.stillWaiting() });
const unsortedAlerts = alerts.features ?? [];
const hasImmediate = unsortedAlerts.reduce((acc, hazard) => acc || hazard.properties.urgency === 'Immediate', false);