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