only print API json when there is one after a call command

This commit is contained in:
proddy
2020-09-26 08:22:36 +02:00
parent 3e66696ef5
commit 8676feaebb

View File

@@ -397,11 +397,9 @@ void EMSESPShell::add_console_commands() {
ok = Command::call(device_type, cmd, arguments[2].c_str(), atoi(arguments[3].c_str()), output);
}
if (ok) {
shell.print(F("output: "));
if (ok && output.size()) {
serializeJson(doc, shell);
shell.println();
shell.println();
}
},
[&](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) -> std::vector<std::string> {