Browse Source

fix save settings

pull/935/head
lumapu 2 years ago
parent
commit
694d4bb58b
  1. 4
      src/app.h
  2. 2
      src/web/web.h

4
src/app.h

@ -82,6 +82,10 @@ class app : public IApp, public ah::Scheduler {
mShowRebootRequest = true; // only message on index, no reboot
mSavePending = true;
mSaveReboot = reboot;
if(reboot) {
onWifi(false);
ah::Scheduler::resetTicker();
}
once(std::bind(&app::tickSave, this), 3, "save");
return true;
}

2
src/web/web.h

@ -600,7 +600,7 @@ class Web {
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");
request->send(response);
}

Loading…
Cancel
Save