minor optimizations

This commit is contained in:
Daniel Sommer 2022-03-24 13:14:42 +01:00
parent 039496a7e0
commit 8d709b4366
2 changed files with 4 additions and 6 deletions

View file

@ -40,7 +40,7 @@ async function setActive(active) {
{ blinkstick: 'strip' }
);
} catch (err) {
logger.error(err);
logger.error('[BLINKY] ' + err);
}
}
@ -90,7 +90,7 @@ async function setStatus(pedals) {
}
}
} catch (err) {
logger.error(err);
logger.error('[BLINKY] ' + err);
}
}
@ -104,7 +104,7 @@ async function setBypass(bypassActive) {
}
await httpPOST(global.config.blinky.host, global.config.blinky.port, 'pulse', { blinkstick: 'square', color: '#660000' });
} catch (err) {
logger.error(err);
logger.error('[BLINKY] ' + err);
}
}

View file

@ -70,9 +70,7 @@ function handleRequests() {
}
function endRequest(request, response, msg, code) {
if (code == undefined) {
code = 200;
}
code = code || 200;
var object = {
request: request,
code: code