diff --git a/web/server/confighub.js b/web/server/confighub.js index bca713c..c787f6e 100644 --- a/web/server/confighub.js +++ b/web/server/confighub.js @@ -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"); });