From 80a8113745db9d64a3a7d7cb364129c25e5d042e Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 24 Nov 2020 16:08:34 +0200 Subject: [PATCH] mongo tail --- swarmlab-app/src/run/app.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 5c60734..366a756 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -253,18 +253,20 @@ app.get('/run', [ ], cors(corsOptions), (req, res, next) => { - var RES = new Object(); - RES.code = req.query["filter"] - RES.token = req.query["filter"] - var isvalid = await checkToken(RES.token); - if(isvalid.action == 'ok'){ - console.log("Authserver ok " + RES.token); - }else{ - console.log("Authserver no " + RES.token); - } - RES.error = false - RES.error_msg = "ok" - res.json(RES) + (async() => { + var RES = new Object(); + RES.code = req.query["filter"] + RES.token = req.query["filter"] + var isvalid = await checkToken(RES.token); + if(isvalid.action == 'ok'){ + console.log("Authserver ok " + RES.token); + }else{ + console.log("Authserver no " + RES.token); + } + RES.error = false + RES.error_msg = "ok" + res.json(RES) + })() });