Browse Source

add rest

master
zeus 4 years ago
parent
commit
3a410d1ba0
  1. 6
      swarmlab-app/src/run/app.js

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

@ -393,15 +393,17 @@ cors(corsOptions), (req, res, next) => {
db.collection('logs').find({}, {}).toArray() db.collection('logs').find({}, {}).toArray()
.then(item => { .then(item => {
console.log(item) console.log(item)
/*
for (let i in item) { for (let i in item) {
reslab = item[i].message.app_name reslab = item[i].message.app_name
if(resdata.data.filter(item1 => item1.res25swarmlabname.includes(reslab))){ if(resdata.filter(item1 => item1.res25swarmlabname.includes(reslab))){
resdataarray.push(item[i]) resdataarray.push(item[i])
} }
} }
*/
RES.error_msg = "ok" RES.error_msg = "ok"
RES.data = item RES.data = item
RES.dataserver = resdataarray RES.dataserver = resdata
res.json(RES) res.json(RES)
}) })
.catch(err => { .catch(err => {

Loading…
Cancel
Save