Commit 0cab72ae authored by Hugo's avatar Hugo
Browse files

fix typo

parent 3365060f
......@@ -148,31 +148,33 @@ async function getData(response, baseUrl, apiAuthKey) {
}
function format(response) {
const data = response.resultatRetour.slice(1).filter(value => {
value.TypeAgregat === "R"
}).map((value, index) => {
const time = moment(value.DateReleve, moment.ISO_8601)
log(
'info',
'date -> ' + value.DateReleve + ' SUBSTRACTING : ' +
value.ValeurIndex +
' - ' +
response.resultatRetour[index].ValeurIndex +
'\n'
)
return {
load:
value.TypeAgregat === 'T'
? null
: value.ValeurIndex - response.resultatRetour[index].ValeurIndex,
year: parseInt(time.format('YYYY')),
month: parseInt(time.format('M')),
day: parseInt(time.format('D')),
hour: 0,
minute: 0,
type: value.TypeAgregat
}
})
const data = response.resultatRetour
.slice(1)
.filter(value => {
value.TypeAgregat === 'R'
})
.map((value, index) => {
const time = moment(value.DateReleve, moment.ISO_8601)
log(
'info',
'date -> ' +
value.DateReleve +
' SUBSTRACTING : ' +
value.ValeurIndex +
' - ' +
response.resultatRetour[index].ValeurIndex +
'\n'
)
return {
load: value.ValeurIndex - response.resultatRetour[index].ValeurIndex,
year: parseInt(time.format('YYYY')),
month: parseInt(time.format('M')),
day: parseInt(time.format('D')),
hour: 0,
minute: 0,
type: value.TypeAgregat
}
})
log('info', 'DATALOAD LIST\n')
data.map(value => {
log(
......
Markdown is supported
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