From 375d2d37c2dc7cb42e0abb709bef3fd7c29c4817 Mon Sep 17 00:00:00 2001 From: build-token <build-token> Date: Tue, 20 Sep 2022 13:00:00 +0000 Subject: [PATCH] publish: Merge branch 'fix/no-contract' into 'main' generated from commit d8820eb117bb15c9a07a32e8621db408c48464b9 --- index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/index.js b/index.js index 8c53b54..1915f0b 100644 --- a/index.js +++ b/index.js @@ -70,7 +70,6 @@ module.exports = new BaseKonnector(start) */ async function start(fields, cozyParameters) { log('info', 'Konnector configuration ...') - log('info', `isManual exectuion: ${manualExecution}`) const pointId = parseInt(fields.pointId) let baseUrl = fields.wso2BaseUrl @@ -113,7 +112,6 @@ async function start(fields, cozyParameters) { log('info', 'User Logging...') if (isFirstStart(await getAccount(ACCOUNT_ID))) { - log('info', 'First start...') const user = await verifyUserIdentity(fields, baseUrl, apiAuthKey, sgeLogin) let consent = await createBoConsent( @@ -378,8 +376,7 @@ async function getMaxPowerData(url, apiAuthKey, userLogin, pointId) { /** * If start date exceed the maximum amount of data we can get with one query - * get only 36 month. - * On manual execution, set the start date to one year ago. + * get only 36 month */ function setStartDate() { if (moment(endDate).diff(startDailyDate, 'months', true) > 36) { @@ -390,10 +387,6 @@ function setStartDate() { startDailyDate = moment(endDate).subtract(36, 'month') startDailyDateString = startDailyDate.format('YYYY-MM-DD') } - if (manualExecution) { - startDailyDate = moment(endDate).subtract(12, 'month') - startDailyDateString = startDailyDate.format('YYYY-MM-DD') - } } /** -- GitLab