diff --git a/cli.js b/cli.js index ccc986f..c945c26 100755 --- a/cli.js +++ b/cli.js @@ -185,6 +185,8 @@ cli.command("list") printMan(); } else if (body === undefined) { printServerProblem(); + } else if (body.data === undefined) { + console.log(chalk.red("No DApps or bots.")); } else { body.data.forEach(function(item, i, arr) { if (item["dapp-url"]) { @@ -281,4 +283,3 @@ cli.version(pkgJson.version) .option("--ip [ip]", "IP address of your device") .option("--dapp-port [dappPort]", "Port of your local DApp server") .parse(process.argv); - diff --git a/index.js b/index.js index 8fc7236..5e41818 100755 --- a/index.js +++ b/index.js @@ -66,7 +66,8 @@ StatusDev.prototype.listDApps = function(cb) { request({ url: this.url + "/list", json: true, - method: "POST" + method: "POST", + body: {} }, function (error, response, body) { if (cb === undefined) { return } cb(error, body);