From 1cb6269cfe11903b35254eb2325f9330a3ba1d62 Mon Sep 17 00:00:00 2001 From: echicken <echicken@bbs.electronicchicken.com> Date: Wed, 24 Apr 2024 14:49:07 -0400 Subject: [PATCH] Whoopsiedoodle --- exec/load/openweathermap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec/load/openweathermap.js b/exec/load/openweathermap.js index 8e49d27370..bacbf3e73b 100644 --- a/exec/load/openweathermap.js +++ b/exec/load/openweathermap.js @@ -103,7 +103,7 @@ OpenWeatherMap.prototype.call_api_v3 = function (params) { const req = new HTTPRequest(); var response = req.Get(url); - response = { data: response, dt: time() }; + response = JSON.parse(response); if (req.response_code >= 200 && req.response_code < 300) { this.write_cache('onecall', params, response); } @@ -137,3 +137,5 @@ OpenWeatherMap.prototype.wind_direction = function (deg) { OpenWeatherMap.prototype.c_to_f = function (c) { return Math.round((c * (9/5)) + 32); } + +OpenWeatherMap; -- GitLab