Skip to content

Commit

Permalink
add new ReturnCmd error called INVALID
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Nov 30, 2022
1 parent ba1813c commit e8d6c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/WebAPIService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {

// send the json that came back from the command call
// FAIL, OK, NOT_FOUND, ERROR, NOT_ALLOWED = 400 (bad request), 200 (OK), 400 (not found), 400 (bad request), 401 (unauthorized)
int ret_codes[5] = {400, 200, 400, 400, 401};
int ret_codes[6] = {400, 200, 400, 400, 401, 400};
response->setCode(ret_codes[return_code]);
response->setLength();
response->setContentType("application/json; charset=utf-8");
Expand Down

0 comments on commit e8d6c4d

Please sign in to comment.