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