Update with the new share handling system.

This commit is contained in:
Alexander Blair
2017-05-19 17:08:47 -07:00
parent 063b206d46
commit 21ba152429
2 changed files with 6 additions and 8 deletions
+2 -3
View File
@@ -24,7 +24,7 @@ app.use(function(req, res, next){
// Master/Slave communication Handling
function messageHandler(message) {
shareData.push(message.data);
shareData.push(message);
}
process.on('message', messageHandler);
@@ -38,8 +38,7 @@ app.post('/leafApi', function (req, res) {
switch (msgData.msgType) {
case global.protos.MESSAGETYPE.SHARE:
try {
global.protos.Share.decode(msgData.msg);
process.send({block: msgData.exInt, data: msgData.msg});
process.send(global.protos.Share.decode(msgData.msg));
} catch (e){
}
return res.json({'success': true});