From 4cd1019cd53a90f433ccb3ccb94a5bbc9b34b121 Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Wed, 7 Dec 2022 09:58:54 +0100 Subject: [PATCH] fix: retours review --- importedData.json | 30 ------------------------------ src/index.js | 6 +++--- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 importedData.json diff --git a/importedData.json b/importedData.json deleted file mode 100644 index 4913586..0000000 --- a/importedData.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "io.cozy.files": [], - "com.grandlyon.enedis.year": [], - "com.grandlyon.enedis.month": [], - "com.grandlyon.enedis.minute": [], - "io.cozy.accounts": [ - { - "cozyMetadata": { - "doctypeVersion": 1, - "metadataVersion": 1, - "createdAt": "2022-12-02T14:54:25.949Z", - "createdByApp": "enedissgegrandlyon", - "createdByAppVersion": "1.2.0", - "updatedAt": "2022-12-02T14:55:04.810Z", - "updatedByApps": [ - { - "slug": "enedissgegrandlyon", - "date": "2022-12-02T14:55:04.810Z", - "version": "1.2.0" - } - ] - }, - "_id": "1111111", - "account_type": "1111111", - "data": { - "name": "pouet" - } - } - ] -} \ No newline at end of file diff --git a/src/index.js b/src/index.js index ea0d235..c0b9945 100644 --- a/src/index.js +++ b/src/index.js @@ -206,7 +206,6 @@ async function start(fields, cozyParameters) { expirationDate: contractEndDate, inseeCode: user.inseeCode, }) - // firstStartTransaction.finish() } else { log('info', 'Alternate start...') transaction.startChild({ op: 'Alternate start' }) @@ -253,10 +252,10 @@ async function start(fields, cozyParameters) { ) } } - transaction.finish() log('info', 'Successfully logged in') - await gatherData(baseUrl, apiAuthKey, sgeLogin, pointId) + + transaction.finish() log('info', 'Konnector success') } @@ -377,6 +376,7 @@ async function getData(url, apiAuthKey, userLogin, pointId) { }).catch(err => { log('error', 'consultationMesuresDetaillees') log('error', err) + Sentry.captureException('consultationMesuresDetaillees:', err) return err }) -- GitLab