bug fix (added upsert)
This commit is contained in:
@@ -36,12 +36,12 @@ Picker.middleware(bodyParser.json());
|
|||||||
var data = req.body;
|
var data = req.body;
|
||||||
Machines.update({
|
Machines.update({
|
||||||
machineId: data.MachineGuid
|
machineId: data.MachineGuid
|
||||||
}, {
|
}, { $set: {
|
||||||
hostname: data.Hostname,
|
hostname: data.Hostname,
|
||||||
status: 'OK',
|
status: 'OK',
|
||||||
platform: data.Platform,
|
platform: data.Platform,
|
||||||
architecture: data.Architecture
|
architecture: data.Architecture
|
||||||
});
|
}}, {upsert: true});
|
||||||
// return res.end()"ok";
|
// return res.end()"ok";
|
||||||
res.end("ok");
|
res.end("ok");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user