mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
#58 added test for /api/remove
This commit is contained in:
1 parent
0dd6315abc
commit
ea603c61fd
2 files changed
+22
-10
No files matched your search
@@ -271,12 +271,13 @@ app.post("/api/remove", function(req, res) {
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
// save items we get
|
||||
var object = req.body;
|
||||
if(!object.instanceName) {
|
||||
object.instanceName = "unknown"
|
||||
}
|
||||
if(!object.instanceID) {
|
||||
object.instanceID = "unknown"
|
||||
}
|
||||
if(!object.instanceName) {
|
||||
object.instanceName = "unknown";
|
||||
}
|
||||
if(slaves[object.instanceID]) object.instanceName = slaves[object.instanceID].instanceName;
|
||||
let item = db.items[object.name]
|
||||
// console.dir(doc);
|
||||
if (!item) {
|
||||
|
||||
Reference in new issue
Block a user