diff --git a/src/index.js b/src/index.js index 7372806b477e9b9d4bdf15568d8043464d31ee26..4af6b62e78273eae2f65c5c02a99847ecac2f5b7 100644 --- a/src/index.js +++ b/src/index.js @@ -16,7 +16,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"); @@ -148,6 +148,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); @@ -245,7 +246,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