From cb8024d51d6c7cebac552f6be3aaf1390b1707fa Mon Sep 17 00:00:00 2001 From: Hugo <hnouts.dev@gmail.com> Date: Mon, 8 Mar 2021 10:15:27 +0100 Subject: [PATCH] stopped d-4 --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 8f2b6af..7f65655 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,8 @@ async function start(fields, cozyParameters) { try { // resetting data for demo only // await resetData() + // const baseUrl = fields.eglBaseURL + // const apiAuthKey = fields.eglAPIAuthKey const baseUrl = cozyParameters.secret.eglBaseURL const apiAuthKey = cozyParameters.secret.eglAPIAuthKey log('info', 'Authenticating ...') @@ -254,7 +256,6 @@ function format(response) { type: value.TypeAgregat } } else { - log('info', 'end of data - date is : ' + value.DateReleve) return { load: null, year: parseInt(time.format('YYYY')), @@ -266,7 +267,8 @@ function format(response) { } } }) - return mapData + const res = [...mapData].filter(v => v.load !== null) + return res } // function processYearAggregation(data, doctype) { -- GitLab