Browse Source

add rest

master
zeus 4 years ago
parent
commit
04d3495317
  1. 23
      swarmlab-app/src/run/app.js

23
swarmlab-app/src/run/app.js

@ -417,18 +417,17 @@ cors(corsOptions), (req, res, next) => {
//if( resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab)).length > 0 ){
var regexlog = new RegExp(nameofswarmlab);
//const res = data.filter(item => item.Date.indexOf(filterKey) === 0);
if( resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab) )){
console.log('----->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>--- ' + nameofswarmlab)
console.log('-----oooooooooooooooooooooo--- ' + item[i])
resdataarray.push(item[i])
RES.found = item[i]
}else{
console.log('-----<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<--- ' + nameofswarmlab)
}
}
for (let i in resdata.data) {
console.log(')))))))))))))))))))))))))))))))))))))))))) '+resdata.data[i].res25swarmlabname)
for (let ii in resdata.data) {
console.log(')))))))))))))))))))))))))))))))))))))))))) '+resdata.data[i].res25swarmlabname)
if( regexlog.test(resdata.data[ii].res25swarmlabname) ){
console.log('-----oooooooooooooooooooooo--- ' + JSON.stringify(item[i]))
resdataarray.push(item[i])
RES.found = item[i]
}else{
console.log('-----<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<--- ' + nameofswarmlab)
}
}
}
RES.error_msg = "ok"

Loading…
Cancel
Save