Bug with wrong channel was fixed
This commit is contained in:
2
main.cpp
2
main.cpp
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
||||
auto channel = req.path_params.at("channel");
|
||||
|
||||
noolitelib::Noolite adapter;
|
||||
if (adapter.sendCommand(0, noolitelib::Switch)) {
|
||||
if (adapter.sendCommand(std::stoi(channel), noolitelib::Switch)) {
|
||||
res.set_content(formatResult(true, command + " " + channel), App::ContentType);
|
||||
} else {
|
||||
res.set_content(formatResult(false, "Device error"), App::ContentType);
|
||||
|
||||
Reference in New Issue
Block a user