From 4a0ef6979fb5447dc733344854e3fba2590027c2 Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 11 Dec 2020 02:48:52 +0200 Subject: [PATCH] add rest --- swarmlab-app/src/run/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index a9dbf5e..a668195 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -395,8 +395,8 @@ cors(corsOptions), (req, res, next) => { console.log(JSON.stringify('mongo connected')) var datestart = DateTime.fromISO(RES.start).toISODate() var dateend = DateTime.fromISO(RES.end).toISODate() - var datestart = RES.start - var dateend = RES.end + var datestart = new Date(RES.start) + var dateend = new Date(RES.end) if(datestart && dateend){ var search_term = { $and: [ { date: { $gt: datestart } }, { date: { $lt: dateend } } ] }; }else if(datestart){