Browse Source

add rest

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

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

@ -385,6 +385,7 @@ cors(corsOptions), (req, res, next) => {
var search_term = { $and: [ { date: { $gt: datestart } }, { date: { $lt: dateend } } ] };
var resdataarray = []
var resraw = {}
db.collection('logs').find({}, {}).toArray()
.then(item => {
console.log(item)
@ -392,10 +393,12 @@ cors(corsOptions), (req, res, next) => {
var resdataobj = {}
resdataobj.lab = resdata.data[i].res25swarmlabname
resdataarray.push(resdataobj)
resraw = resdata.data[i]
}
RES.error_msg = "ok"
RES.data = item
RES.dataserver = resdataarray
RES.dataserverraw = resraw
res.json(RES)
})
.catch(err => {

Loading…
Cancel
Save