Added debug tools for adding/removing items

This commit is contained in:
Danielv123 committed 2017-10-26 21:17:59 +02:00
1 parent f886fe3e95
commit 04aba1eef1
2 files changed
+35 -2

No files matched your search

+6 -1
View File
@@ -215,7 +215,12 @@ var recievedItemStatistics = new averagedTimeSeries({
app.post("/api/place", function(req, res) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
let x = req.body;
let x;
try {
x = JSON.parse(req.body);
} catch (e) {
x = req.body;
}
if(!x.instanceName) {
x.instanceName = "unknown";
}