mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-18 08:47:13 +02:00
fix save settings
This commit is contained in:
parent
23e848d224
commit
694d4bb58b
2 changed files with 5 additions and 1 deletions
|
@ -82,6 +82,10 @@ class app : public IApp, public ah::Scheduler {
|
||||||
mShowRebootRequest = true; // only message on index, no reboot
|
mShowRebootRequest = true; // only message on index, no reboot
|
||||||
mSavePending = true;
|
mSavePending = true;
|
||||||
mSaveReboot = reboot;
|
mSaveReboot = reboot;
|
||||||
|
if(reboot) {
|
||||||
|
onWifi(false);
|
||||||
|
ah::Scheduler::resetTicker();
|
||||||
|
}
|
||||||
once(std::bind(&app::tickSave, this), 3, "save");
|
once(std::bind(&app::tickSave, this), 3, "save");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,7 +600,7 @@ class Web {
|
||||||
|
|
||||||
mApp->saveSettings((request->arg("reboot") == "on"));
|
mApp->saveSettings((request->arg("reboot") == "on"));
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), system_html, save_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), save_html, save_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue