|
@ -289,13 +289,13 @@ app.get('/get_log', [ |
|
|
//check('llo').isBase64()
|
|
|
//check('llo').isBase64()
|
|
|
], |
|
|
], |
|
|
cors(corsOptions), (req, res, next) => { |
|
|
cors(corsOptions), (req, res, next) => { |
|
|
|
|
|
|
|
|
(async() => { |
|
|
|
|
|
var RES = new Object(); |
|
|
var RES = new Object(); |
|
|
RES.token = req.query["token"] |
|
|
RES.token = req.query["token"] |
|
|
RES.start = req.query["start"] |
|
|
RES.start = req.query["start"] |
|
|
RES.end = req.query["end"] |
|
|
RES.end = req.query["end"] |
|
|
RES.filter = req.query["filter"] |
|
|
RES.filter = req.query["filter"] |
|
|
|
|
|
|
|
|
|
|
|
(async() => { |
|
|
var isvalid = await checkToken(RES.token); |
|
|
var isvalid = await checkToken(RES.token); |
|
|
if(isvalid.action == 'ok'){ |
|
|
if(isvalid.action == 'ok'){ |
|
|
console.log("Authserver ok " + RES.token); |
|
|
console.log("Authserver ok " + RES.token); |
|
@ -318,7 +318,7 @@ if(RES.error == 'ok'){ |
|
|
//db.collection('log', onCollection);
|
|
|
//db.collection('log', onCollection);
|
|
|
console.log(JSON.stringify('mongo connected')) |
|
|
console.log(JSON.stringify('mongo connected')) |
|
|
|
|
|
|
|
|
db.collection('logs').find({}, {}) |
|
|
db.collection('logs').find({}, {}).toArray() |
|
|
.then(item => { |
|
|
.then(item => { |
|
|
console.log(item) |
|
|
console.log(item) |
|
|
RES.error_msg = "ok" |
|
|
RES.error_msg = "ok" |
|
|