ls-manual-update

Checks for manual update of ls-vertretunsplan-desktop and tells outdated clients
git clone git://archive.git.mtrnord.blog/MTRNord/ls-manual-update.git
Log | Files | Refs | LICENSE

commit af65c9b3f5ddf9876c03ea61f77715a7bb2be605
parent d7dc2254c91a143006ef6fd0a5ac7e28c748d3b2
Author: Marcel <mtrnord1@gmail.com>
Date:   Wed, 30 Nov 2016 13:50:45 +0100

update API

Diffstat:
Mindex.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js @@ -38,11 +38,11 @@ io.on('connection', function(socket){ if (key["name"] == 'local') { var local_asset = key["name"] console.log("local"); - io.emit('AupdateStatus', 'local'); + io.emit('AupdateStatus', {'status': 'local', 'body': release_body}); }else { if (_.findIndex(assets, key) == assets.length-1) { console.log("not local"); - io.emit('AupdateStatus', 'NOTlocal'); + io.emit('AupdateStatus', {'status': 'NOTlocal'}); } // }else { // io.emit('AupdateStatus', 'bug'); @@ -69,12 +69,13 @@ io.on('connection', function(socket){ _.find(assets, function (key) { if (key["name"] == 'local') { var local_asset = key["name"] + var release_body = release["body"] console.log("local"); - io.emit('AupdateStatus', 'local'); + io.emit('AupdateStatus', {'status': 'local', 'body': release_body}); }else { if (_.findIndex(assets, key) == assets.length-1) { console.log("not local"); - io.emit('AupdateStatus', 'NOTlocal'); + io.emit('AupdateStatus', {'status': 'NOTlocal'}); } // }else { // io.emit('AupdateStatus', 'bug');