mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
split out commands with and without json
This commit is contained in:
@@ -52,7 +52,7 @@ void WebAPIService::webAPIService(AsyncWebServerRequest * request) {
|
||||
String cmd = request->getParam(F_(cmd))->value();
|
||||
|
||||
// look up command in our list
|
||||
if (!Command::find_command(device_type, cmd.c_str())) {
|
||||
if (Command::find_command(device_type, cmd.c_str()) == nullptr) {
|
||||
request->send(400, "text/plain", F("Invalid cmd"));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user