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 aeb181e0e79075b619e4a1cb608291ac0d109136
parent 98936267b60331db0be0a470982b267bcd09e6d8
Author: Marcel <mtrnord1@gmail.com>
Date:   Wed, 30 Nov 2016 10:25:32 +0100

fix bug

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

diff --git a/index.js b/index.js @@ -34,18 +34,20 @@ io.on('connection', function(socket){ var release = jsonfile.readFileSync("cache.json") var version = release["tag_name"] var assets = release["assets"] - x = 0; _.find(assets, function (key) { if (key["name"] == 'local') { var local_asset = key["name"] + console.log("local"); io.emit('AupdateStatus', 'local'); }else { - if (!x == assets.length) { + if (_.findIndex(assets, key) == assets.length-1) { console.log("not local"); io.emit('AupdateStatus', 'NOTlocal'); + }else { + io.emit('AupdateStatus', 'bug'); } + console.log("Länge X " + _.findIndex(assets, key)); } - x + 1; }) } else { console.log("aquire file");