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

@@ -25,14 +25,10 @@ class ExtendedForecast extends WeatherDisplay {
if (navigation.units() === UNITS.metric) units = 'si';
let forecast;
try {
forecast = await $.ajax({
type: 'GET',
url: weatherParameters.forecast,
forecast = await utils.fetch.json(weatherParameters.forecast,{
data: {
units,
},
dataType: 'json',
crossDomain: true,
});
} catch (e) {
console.error('Unable to get extended forecast');