Browse Source

Mache Kommentar für die innere Bedingung, damit diese nicht unbeabsichtigt irgendwann verschwindet

master
Philipp 3 years ago
parent
commit
48180c79e3
  1. 2
      switch.js

2
switch.js

@ -19,7 +19,7 @@ function runLoop() {
{ method: "POST", url: CONFIG.pollingUrl, body: '{"801":{"170":null}}', timeout: 10 },
function (res, error_code, error_msg, ud) {
print("errors-http-post:", error_code, error_msg);
if (error_code === 0) {
if (error_code === 0) { // do this so that during timeout no crash
let parsedBody = JSON.parse(res.body);
let production = parsedBody["801"]["170"]["101"];
let consumption = parsedBody["801"]["170"]["110"];

Loading…
Cancel
Save