remove additional jquery ajax requests

This commit is contained in:
Matt Walsh
2020-10-01 21:35:49 -05:00
parent 5a766a809d
commit 456af1b09a
11 changed files with 86 additions and 124 deletions

View File

@@ -94,14 +94,10 @@ class LocalForecast extends WeatherDisplay {
let units = 'us';
if (navigation.units() === UNITS.metric) units = 'si';
try {
return await $.ajax({
type: 'GET',
url: weatherParameters.forecast,
return await utils.fetch.json(weatherParameters.forecast, {
data: {
units,
},
dataType: 'json',
crossDomain: true,
});
} catch (e) {