Skip to content

Commit

Permalink
[WebUI] Use common methods for restart and erase (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile authored Apr 28, 2023
1 parent 587797a commit db32df9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions main/ZwebUI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,7 @@ void handleRoot() {

delay(2000); // Wait for web page to be sent before

# if defined(ESP8266)
ESP.reset();
# else
ESP.restart();
# endif
ESPRestart();
} else {
// WEBUI_TRACE_LOG(F("Arguments %s" CR), message);
server.send(200, "text/plain", "00:14:36.767 RSL: RESULT = {\"Topic\":\"topic\"}");
Expand Down Expand Up @@ -888,8 +884,7 @@ void handleRT() {
response += String(buffer);
server.send(200, "text/html", response);

nvs_flash_erase();
ESP.restart();
eraseAndRestart();
} else {
handleCN();
}
Expand Down Expand Up @@ -1358,7 +1353,6 @@ String stateWebUIStatus() {
WebUIdata["displayMetric"] = (bool)displayMetric;
WebUIdata["webUISecure"] = (bool)webUISecure;
WebUIdata["displayQueue"] = uxQueueMessagesWaiting(webUIQueue);
;

String output;
serializeJson(WebUIdata, output);
Expand Down

0 comments on commit db32df9

Please sign in to comment.