Merge branch 'master' into pr/3

This commit is contained in:
veladon committed 2019-07-15 13:57:27 +01:00
commit c0499e7f27
1 file changed
+4 -1
@@ -26,7 +26,10 @@ class masterPlugin {
@returns {string} failure
*/
app.post("/api/logStats", authenticate.middleware, function(req,res) {
let data = JSON.parse(req.body.forceData);
let data = req.body.forceData;
if(typeof req.body.forceData == "string") {
data = JSON.parse(req.body.forceData);
}
// endpointHitCounter.labels(req.route.path).inc();
if(typeof req.body == "object"
&& req.body.instanceID