modified to use events, hopefully will fix the crashing particle
This commit is contained in:
parent
31ba1ebb94
commit
da0b134f53
@ -132,7 +132,7 @@ router.post('/', function (req, res, next) {
|
||||
logger.debug('We have data');
|
||||
var data = JSON.parse(t.data.toString());
|
||||
|
||||
if (data.hasOwnProperty(temp)) {
|
||||
if (data.hasOwnProperty('temp')) {
|
||||
logger.log('We have temp! ' + data.temp);
|
||||
busEmitter.emit("saveTempData", {time: now.toJSON(), value: parseFloat(data.temp)});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user