Commit dec78695 authored by Hugo's avatar Hugo
Browse files

logs

parent 6fcc6b05
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment