Skip to content
Snippets Groups Projects
Commit 6be1a703 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

add debug logs

parent 09628a10
No related branches found
No related tags found
1 merge request!20Update master branch
...@@ -136,8 +136,13 @@ async function getData(token, idPCE) { ...@@ -136,8 +136,13 @@ async function getData(token, idPCE) {
async function getActualDailyLoadData() { async function getActualDailyLoadData() {
log('debug', 'Retrieve previous daily data') log('debug', 'Retrieve previous daily data')
const result = await cozyClient.data.findAll('com.grandlyon.grdf.day') const result = await cozyClient.data.findAll('com.grandlyon.grdf.day')
log('debug', result) if (result && result.length > 0) {
return result ? result : [] const formatedData = formateData(result)
log("debug", "FORMATED OLD DATA")
log("debug", formatedData)
return formatedData
}
return []
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment