Fiexes another bug with networking

This commit is contained in:
Johannes Wendel
2019-10-28 16:49:39 +01:00
parent 31738f515b
commit 6084b01c7c

View File

@@ -193,9 +193,9 @@ boost::optional<Poco::JSON::Object> OutputRequestHandler::parseLamp(const std::s
boost::optional<Poco::JSON::Object> OutputRequestHandler::parseSound(const std::string& item_name, const std::string& action) boost::optional<Poco::JSON::Object> OutputRequestHandler::parseSound(const std::string& item_name, const std::string& action)
{ {
Poco::JSON::Object response;
if(item_name == "") if(item_name == "")
{ {
Poco::JSON::Object response;
response.set("sounds", getItemArray(this->output_driver->get_sounds()) ); response.set("sounds", getItemArray(this->output_driver->get_sounds()) );
return response; return response;
} }
@@ -217,8 +217,8 @@ boost::optional<Poco::JSON::Object> OutputRequestHandler::parseSound(const std::
{ {
throw new Poco::NotFoundException("No action with name \"" + action + "\" on sounds!"); throw new Poco::NotFoundException("No action with name \"" + action + "\" on sounds!");
} }
return {}; return response;
} }
boost::optional<Poco::JSON::Object> OutputRequestHandler::parseDisplay(const std::string& item_name, const std::string& action, const std::string& score) boost::optional<Poco::JSON::Object> OutputRequestHandler::parseDisplay(const std::string& item_name, const std::string& action, const std::string& score)