node-express-woodevice
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "node-express-woodevice", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,13 @@ const returnModel = require('woo-utilities/returnModel'); | ||
var processDevices = {}; | ||
router.post('/insert', authToken.handler(token.DEVICE_INSERT), async (req, res) => { | ||
if (processDevices[req.body.device]) { | ||
return res.send(returnModel({ | ||
data: null | ||
})); | ||
} else { | ||
processDevices[req.body.device] = true; | ||
} | ||
// req.body.device, req.body.keys, req.body.os | ||
@@ -59,2 +69,3 @@ var device = await deviceRepo.findByDevice(req.body.device); | ||
delete processDevices[req.body.device]; | ||
res.send(returnModel({ | ||
@@ -61,0 +72,0 @@ data: iysContent |
5912
166