bug fix (added upsert)

This commit is contained in:
Edin Dazdarevic
2015-05-29 21:15:16 +02:00
parent 568f8b2cb3
commit 22eab15b27

View File

@@ -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");
});