quickshell: notification daemon
This commit is contained in:
@@ -118,10 +118,10 @@ Singleton {
|
||||
function _fetchWeather(latitude, longitude, errorCallback) {
|
||||
Logger.log("Location", "Fetching weather from api.open-meteo.com");
|
||||
var url = "https://api.open-meteo.com/v1/forecast?latitude=" + latitude + "&longitude=" + longitude + "¤t_weather=true¤t=relativehumidity_2m,surface_pressure&daily=temperature_2m_max,temperature_2m_min,weathercode&timezone=auto";
|
||||
curl.fetch(url, function(success, data) {
|
||||
curl.fetch(url, function(success, fetchedData) {
|
||||
if (success) {
|
||||
try {
|
||||
var weatherData = JSON.parse(data);
|
||||
var weatherData = JSON.parse(fetchedData);
|
||||
// Save core data
|
||||
data.weather = weatherData;
|
||||
data.weatherLastFetch = Time.timestamp;
|
||||
|
||||
Reference in New Issue
Block a user