diff --git a/retrieve-datas.js b/retrieve-datas.js index 879962a..6dda5cf 100644 --- a/retrieve-datas.js +++ b/retrieve-datas.js @@ -13,5 +13,7 @@ config(); .then(response => response.json()) .then(data => data); + if (!Array.isArray(datas)) return; + writeFileSync("events.json", JSON.stringify(datas, null, 4)); })() \ No newline at end of file