homebridge-syntex-webhooks
Advanced tools
Comparing version 1.0.4-b5 to 1.0.4-b6
28
index.js
@@ -87,4 +87,2 @@ var request = require('request'); | ||
{ | ||
log('\x1b[32m%s\x1b[0m', "[SUCCESS]", "Storage.json geladen!"); | ||
var found = false; | ||
@@ -115,3 +113,3 @@ | ||
if(found == false) | ||
{ | ||
{ | ||
if(urlParams.type) | ||
@@ -134,2 +132,4 @@ { | ||
{ | ||
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht geladen werden!"); | ||
if(urlParams.type) | ||
@@ -200,4 +200,2 @@ { | ||
{ | ||
log('\x1b[32m%s\x1b[0m', "[SUCCESS]", "Storage.json geladen!"); | ||
var found = false; | ||
@@ -215,2 +213,4 @@ | ||
response.end(); | ||
found = true; | ||
} | ||
@@ -222,6 +222,20 @@ } | ||
response.end(); | ||
found = true; | ||
} | ||
} | ||
} | ||
if(!found) | ||
{ | ||
response.write("Es wurde kein passendes Gerät gefunden!"); | ||
response.end(); | ||
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Es wurde kein passendes Gerät gefunden!"); | ||
} | ||
} | ||
else | ||
{ | ||
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht geladen werden!"); | ||
} | ||
}); | ||
@@ -519,4 +533,2 @@ } | ||
{ | ||
log('\x1b[32m%s\x1b[0m', "[SUCCESS]", "Storage.json geladen!"); | ||
var found = false; | ||
@@ -545,2 +557,4 @@ | ||
{ | ||
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht geladen werden!"); | ||
var device = { | ||
@@ -547,0 +561,0 @@ id: "storage", |
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "1.0.4-b5", | ||
"version": "1.0.4-b6", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
27656
525