From e39a1e478cc9d53e53b031f84913beb32f4efe55 Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 10 Dec 2020 20:27:07 +0200 Subject: [PATCH] add rest --- swarmlab-app/src/run/app.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 5460b7e..a1a75f3 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -395,17 +395,18 @@ cors(corsOptions), (req, res, next) => { db.collection('logs').find({}, {}).toArray() .then(item => { console.log(item) - /* + for (let i in item) { reslab = item[i].message.app_name - if(resdata.filter(item1 => item1.res25swarmlabname.includes(reslab))){ + if(resdata.data.filter(item1 => item1.res25swarmlabname.includes(reslab))){ resdataarray.push(item[i]) } } - */ + RES.error_msg = "ok" RES.data = item - RES.dataserver = resdata + RES.dataserver = resdataarray + RES.dataservertmp = resdata res.json(RES) }) .catch(err => {