From 0a0a3f0547c6eed0c69ca654ebd7781df175a485 Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 10 Dec 2020 17:32:32 +0200 Subject: [PATCH] add rest --- swarmlab-app/src/run/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 20c089e..4d3c9a7 100755 --- a/swarmlab-app/src/run/app.js +++ b/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 => {