diff --git a/index.js b/index.js index 4a254a810c3abdd6a747624c4185d9004fc5ef68..f1c0b095e6c30db3fe2b9255b9f16e435de1b987 100644 --- a/index.js +++ b/index.js @@ -139,7 +139,7 @@ moment.tz.setDefault("Europe/Paris"); // set the timezone const startDate = moment() .startOf("year") // .subtract(3, "year") - .subtract(6, "month") + .subtract(1, "month") .subtract(1, "day") .format("MM/DD/YYYY"); const endDate = moment().format("MM/DD/YYYY"); @@ -271,6 +271,7 @@ async function getData(response, baseUrl, apiAuthKey) { } function format(response) { + log("info", "origin response size is : " + response.resultatRetour.length) const data = response.resultatRetour .slice(1) .filter(value => value.ValeurIndex); @@ -368,7 +369,7 @@ async function storeData(data, doctype, keys) { log("debug", "Store into " + doctype); log("debug", "Store into keys : " + keys); data.map(v => { - log("info", "Saving data " + v.load + " for " + v.day + "/" + v.month); + log("info", "Saving data " + v.load + " for " + v.day + "/" + v.month + "/" + v.year); }); return hydrateAndFilter(data, doctype, { keys: keys