diff --git a/sharedPlugins/statisticsExporter/masterPlugin.js b/sharedPlugins/statisticsExporter/masterPlugin.js index 1dae44bd..689dd2eb 100644 --- a/sharedPlugins/statisticsExporter/masterPlugin.js +++ b/sharedPlugins/statisticsExporter/masterPlugin.js @@ -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