From 54bd8b29878800f4fc9c087b2ca3915e7e800a0c Mon Sep 17 00:00:00 2001
From: git-directory-deploy <>
Date: Thu, 28 Jan 2021 14:39:29 +0100
Subject: [PATCH] publish: use moment for isHistoryLoaded function

generated from commit a041b829112bfe4bd211a5b74338d2170e67f1c3
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index ffd6232..a611622 100644
--- a/index.js
+++ b/index.js
@@ -107,8 +107,8 @@ moment.locale('fr') // set the language
 moment.tz.setDefault('Europe/Paris') // set the timezone
 
 /*** Connector Constants ***/
-const manualExecution = process.env.COZY_JOB_MANUAL_EXECUTION
-let startDailyDate = manualExecution
+const manualExecution = process.env.COZY_JOB_MANUAL_EXECUTION === "true" ? true : false
+const startDailyDate = manualExecution
   ? moment().subtract(12, 'month')
   : moment().subtract(32, 'month')
 const startDailyDateString = startDailyDate.format('YYYY-MM-DD')
-- 
GitLab