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