Commit 6314e263 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

add debug logs

parent 947cca74
......@@ -136,8 +136,13 @@ 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 : []
if (result && result.length > 0) {
const formatedData = formateData(result)
log("debug", "FORMATED OLD DATA")
log("debug", formatedData)
return formatedData
}
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