fix /api/editSlaveMeta creating new slaves when it shouldn't

This commit is contained in:
Danielv123 committed 2017-05-26 15:25:49 +02:00
1 parent bafc8dfc44
commit 960cd79be3
1 file changed
+1 -2
+1 -2
View File
@@ -88,7 +88,7 @@ app.post("/api/getID", function(req,res) {
console.log("Slave registered: " + slaves[req.body.unique].mac + " : " + slaves[req.body.unique].serverPort+" at " + slaves[req.body.unique].publicIP + " with name " + slaves[req.body.unique].instanceName);
}
});
// todo: Write docs for this
app.post("/api/editSlaveMeta", function(req,res) {
// request.body should be an object
// {slaveID, pass, meta:{x,y,z}}
@@ -104,7 +104,6 @@ app.post("/api/editSlaveMeta", function(req,res) {
} else {
res.send("ERROR: Invalid slaveID or password")
}
slaves[req.body.slaveID] = req.body;
}
});
// mod management