Skip to content

Commit

Permalink
rename "name" to "entity" for API key - Refactor MQTT subscriptions a…
Browse files Browse the repository at this point in the history
…nd API calls #173
  • Loading branch information
proddy committed Nov 5, 2021
1 parent ae4a135 commit 7bca3fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ uint8_t Command::process(const char * path, const bool authenticated, const Json
snprintf(command, sizeof(command), "%s/%s", p.paths()[1].c_str(), p.paths()[2].c_str());
command_p = command;
} else {
// take it from the JSON. Support both name and cmd to keep backwards compatibility
if (input.containsKey("name")) {
command_p = input["name"];
// take it from the JSON
if (input.containsKey("entity")) {
command_p = input["entity"];
} else if (input.containsKey("cmd")) {
command_p = input["cmd"];
}
Expand Down

0 comments on commit 7bca3fb

Please sign in to comment.