diff --git a/bin/telebitd.js b/bin/telebitd.js index 2efe39b..cd4a265 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -342,10 +342,11 @@ function serveControls() { } if (/status/.test(opts.path)) { - res.end( - '{"status":' + (state.config.disable ? 'disabled' : 'enabled') - + ',"ready":' + ((state.config.relay && (state.config.token || state.config.agreeTos)) ? 'true' : 'false') - + '}'); + res.end(JSON.stringify( + { status: (state.config.disable ? 'disabled' : 'enabled') + , ready: ((state.config.relay && (state.config.token || state.config.agreeTos)) ? true : false) + } + )); return; }