diff --git a/index.js b/index.js index 8c53b54ca0a63b47dad25e35974433a5500ef426..1915f0bc19f3ab6b0a1dbd11779942326fdadf86 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') - } } /**