mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Merge pull request #167 from veladon/pr/3
fix for stats exporter console errors
This commit is contained in:
1 file changed
+4
-1
@@ -26,7 +26,10 @@ class masterPlugin {
|
|||||||
@returns {string} failure
|
@returns {string} failure
|
||||||
*/
|
*/
|
||||||
app.post("/api/logStats", authenticate.middleware, function(req,res) {
|
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();
|
// endpointHitCounter.labels(req.route.path).inc();
|
||||||
if(typeof req.body == "object"
|
if(typeof req.body == "object"
|
||||||
&& req.body.instanceID
|
&& req.body.instanceID
|
||||||
|
|||||||
Reference in new issue
Block a user