remove additional jquery ajax requests
This commit is contained in:
parent
5a766a809d
commit
456af1b09a
11 changed files with 86 additions and 124 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue