diff --git a/index.js b/index.js index c1889265d38c129cd247ad87a3464ad0a7d4b781..7cb89f0d33de020f0309b4a4e2a57fadc0830868 100644 --- a/index.js +++ b/index.js @@ -226,7 +226,7 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { return resp.data } else { const errorMessage = `Authentication failed. Response data: ${resp.data.libelleRetour}` - log('error', errorMessage) + log('debug', errorMessage) throw new Error(`code retour ko : ${resp.data.codeRetour}`) } } catch (error) { @@ -241,6 +241,8 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { } async function getData(response, baseUrl, apiAuthKey) { + log('debug', 'Start date : ' + startDate) + log('debug', 'End date : ' + endDate) const dataRequest = { method: 'post', url: baseUrl + '/getAllAgregatsByAbonnement.aspx', @@ -351,6 +353,8 @@ function format(response) { * Save data in the right doctype db and prevent duplicated keys */ async function storeData(data, doctype, filterKeys) { + log('debug', 'Store into ' + doctype) + log('debug', 'Store into keys : ' + filterKeys) const filteredDocuments = await hydrateAndFilter(data, doctype, { keys: filterKeys, })