Browse Source

add rest

master
zeus 4 years ago
parent
commit
e39a1e478c
  1. 9
      swarmlab-app/src/run/app.js

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

@ -395,17 +395,18 @@ 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.filter(item1 => item1.res25swarmlabname.includes(reslab))){ if(resdata.data.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 = resdata RES.dataserver = resdataarray
RES.dataservertmp = resdata
res.json(RES) res.json(RES)
}) })
.catch(err => { .catch(err => {

Loading…
Cancel
Save