|
|
@ -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 => { |
|
|
|