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' } { blinkstick: 'strip' }
); );
} catch (err) { } catch (err) {
logger.error(err); logger.error('[BLINKY] ' + err);
} }
} }
@ -90,7 +90,7 @@ async function setStatus(pedals) {
} }
} }
} catch (err) { } 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' }); await httpPOST(global.config.blinky.host, global.config.blinky.port, 'pulse', { blinkstick: 'square', color: '#660000' });
} catch (err) { } catch (err) {
logger.error(err); logger.error('[BLINKY] ' + err);
} }
} }

View file

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