Commit 3a42568f authored by Yoan VALLET's avatar Yoan VALLET
Browse files

add logs for debug

parent 6314e263
......@@ -137,10 +137,17 @@ async function getActualDailyLoadData() {
log('debug', 'Retrieve previous daily data')
const result = await cozyClient.data.findAll('com.grandlyon.grdf.day')
if (result && result.length > 0) {
const formatedData = formateData(result)
log("debug", "FORMATED OLD DATA")
log("debug", formatedData)
return formatedData
log("debug", "RESULT FOUND")
log("debug", result)
log("debug", "DISPLAY ELEMENT")
data.forEach(element => {
log("debug", element)
log("debug", "DISPLAY DATE")
log("debug", element.year + ' ' + element.month + ' ' + element.day)
log("debug", "DISPLAY LOAD")
log("debug", element.load)
})
return result
}
return []
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment