Readded config changed check for reboot.

This commit is contained in:
Rene Zeldenthuis
2022-09-10 23:53:31 +02:00
parent 613a34b396
commit d8ef39b8bc

View File

@@ -86,13 +86,13 @@ void handle_root()
void handle_restart() void handle_restart()
{ {
log_v("Handle restart"); log_v("Handle restart");
// if (!config_changed) if (!config_changed)
// { {
// Redirect to root page. // Redirect to root page
// web_server.sendHeader("Location", "/", true); web_server.sendHeader("Location", "/", true);
// web_server.send(302, "text/plain", ""); web_server.send(302, "text/plain", "");
// return; return;
// } }
const template_variable_t substitutions[] = { const template_variable_t substitutions[] = {
{"AppTitle", APP_TITLE}, {"AppTitle", APP_TITLE},
@@ -106,7 +106,7 @@ void handle_restart()
web_server.send(200, "text/html", html); web_server.send(200, "text/html", html);
log_v("Restarting... Press refresh to connect again"); log_v("Restarting... Press refresh to connect again");
sleep(1000); sleep(1000);
// ESP.restart(); ESP.restart();
} }
void on_config_saved() void on_config_saved()