From a1bcf8814d83718670eca07f1a1305690f47669c Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Wed, 10 Jun 2020 13:24:19 +0200 Subject: [PATCH] Change doctype to com.grandlyon.egl.* --- manifest.konnector | 18 +++--------------- src/index.js | 8 ++++---- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/manifest.konnector b/manifest.konnector index 09036ca..2d0e30a 100644 --- a/manifest.konnector +++ b/manifest.konnector @@ -27,14 +27,8 @@ "data_types": [], "screenshots": [], "permissions": { - "egl daily data": { - "type": "io.egl.day" - }, - "egl monthly data": { - "type": "io.egl.month" - }, - "egl yearly data": { - "type": "io.egl.year" + "egl data": { + "type": "com.grandlyon.egl.*" }, "accounts": { "type": "io.cozy.accounts", @@ -51,13 +45,7 @@ "short_description": "Courbe de charge depuis l'API eau du Grand Lyon", "long_description": "ce connecteur récupère la courbe de charge enregistrée par le compteur Téléo", "permissions": { - "egl daily data": { - "description": "La courbe de charge enregistrée par le compteur téléo" - }, - "egl monthly data": { - "description": "La courbe de charge enregistrée par le compteur téléo" - }, - "egl yearly data": { + "egl data": { "description": "La courbe de charge enregistrée par le compteur téléo" }, "accounts": { diff --git a/src/index.js b/src/index.js index 1bad305..94f75ac 100644 --- a/src/index.js +++ b/src/index.js @@ -22,15 +22,15 @@ const endDate = moment().format('MM/DD/YYYY') const timeRange = ['day', 'month', 'year'] const rangeDate = { day: { - doctype: 'io.egl.day', + doctype: 'com.grandlyon.egl.day', keys: ['year', 'month', 'day'] }, month: { - doctype: 'io.egl.month', + doctype: 'com.grandlyon.egl.month', keys: ['year', 'month'] }, year: { - doctype: 'io.egl.year', + doctype: 'com.grandlyon.egl.year', keys: ['year'] } } @@ -232,7 +232,7 @@ async function storeData(data, doctype, keys) { /** * Function handling special case. * The temporary aggregated data need to be remove in order for the most recent one te be saved. - * ex for io.egl.month : + * ex for com.grandlyon.egl.month : * { load: 76.712, month: 2020, ... } need to be replace by * { load: 82.212, month: 2020, ... } after grdf data reprocess */ -- GitLab