Browse Source

terminal: both API implementations to use line param instead of value

mcspr-patch-1
Maxim Prokhorov 4 years ago
parent
commit
5fdbd1df5b
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      code/espurna/terminal.cpp

+ 3
- 3
code/espurna/terminal.cpp View File

@ -551,8 +551,8 @@ void terminalWebApiSetup() {
},
[](ApiRequest& api) {
// TODO: since HTTP spec allows query string to contain repeating keys, allow iteration
// over every 'value' available to provide a way to call multiple commands at once
auto cmd = api.param(F("value"));
// over every received 'line' to provide a way to call multiple commands at once
auto cmd = api.param(F("line"));
if (!cmd.length()) {
return false;
}
@ -585,7 +585,7 @@ void terminalWebApiSetup() {
return true;
}
auto* cmd_param = request->getParam("value", (request->method() == HTTP_PUT));
auto* cmd_param = request->getParam("line", (request->method() == HTTP_PUT));
if (!cmd_param) {
request->send(500);
return true;


Loading…
Cancel
Save