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

add log for debug

parent c870a719
Branches
No related tags found
1 merge request!20Update master branch
......@@ -136,6 +136,7 @@ async function getData(token, idPCE) {
async function getActualDailyLoadData() {
log('debug', 'Retrieve previous daily data')
const result = await cozyClient.data.findAll('com.grandlyon.grdf.day')
log('debug', result)
return result ? result : []
}
......@@ -212,6 +213,9 @@ async function agregateMonthAndYearData(data, previousData) {
})
if(filteredPreviousData[0]){
oldValue = filteredPreviousData[0].load
log("debug", "OLDVALUE FOUND")
log("debug", oldValue)
log("debug", element)
}
element.year + '-' + element.month in monthData
? (monthData[element.year + '-' + element.month] += element.load - oldValue)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment