From 04d3495317d148a6c3c22c433f6eac6b35c10fcb Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 11 Dec 2020 00:30:12 +0200 Subject: [PATCH] add rest --- swarmlab-app/src/run/app.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index b35494a..3574141 100755 --- a/swarmlab-app/src/run/app.js +++ b/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"