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