From 27c1b0ceebddc9c702df087cf14df006546d1b4f Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 13 Jun 2018 12:34:45 -0600 Subject: [PATCH] bugfix --- bin/telebitd.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/telebitd.js b/bin/telebitd.js index 20f28c2..ab4783b 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -129,7 +129,7 @@ function serveControls() { // relay, email, agree_tos, servernames, ports // opts.body.forEach(function (opt) { - var parts = opt.split(/,/); + var parts = opt.split(/:/); conf[parts[0]] = parts[1]; }); if (!state.config.relay || !state.config.email || !state.config.agreeTos) { @@ -166,7 +166,16 @@ function serveControls() { if (!state.config.relay || !state.config.email || !state.config.agreeTos) { res.statusCode = 400; - res.end('{"error":{"code":"E_CONFIG","message":"Missing important config file params. Please run \'telebit init\'"}}'); + + res.end(JSON.stringify({ + error: { + code: "E_INIT" + , message: "Missing important config file params" + , _params: JSON.stringify(conf) + , _config: JSON.stringify(state.config) + , _body: JSON.stringify(opts.body) + } + })); return; }