Browse Source

add rest

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

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

@ -393,8 +393,8 @@ cors(corsOptions), (req, res, next) => {
//usersession.SOCKET.token = isvalid.token
//db.collection('log', onCollection);
console.log(JSON.stringify('mongo connected'))
var datestart = DateTime.fromObject(RES.start).toISODate()
var dateend = DateTime.fromObject(RES.end).toISODate()
var datestart = DateTime.fromISO(RES.start).toISODate()
var dateend = DateTime.fromISO(RES.end).toISODate()
if(datestart && dateend){
var search_term = { $and: [ { date: { $gt: datestart } }, { date: { $lt: dateend } } ] };
}else if(datestart){

Loading…
Cancel
Save