diff --git a/node_helper.js b/node_helper.js index a7f7da0..e744a6d 100644 --- a/node_helper.js +++ b/node_helper.js @@ -18,9 +18,11 @@ module.exports = NodeHelper.create({ host: payload.domain, path: payload.path }; + http.get(options, function (response) { var pngFiles = payload.mmDir + 'modules/mmm-weatherchart/cache/*.png'; - del([pngFiles]); + del.sync([pngFiles]); + var cachedFile = 'modules/mmm-weatherchart/cache/map-' + new Date().getTime() + '.png'; var newImage = fs.createWriteStream(payload.mmDir + cachedFile); response.on('data', function(chunk){