added save function to write settings to fS

This commit is contained in:
proddy
2020-07-26 22:35:55 +02:00
parent 5c354af1ba
commit 2ec35d1fbc
2 changed files with 5 additions and 0 deletions

View File

@@ -82,4 +82,8 @@ void EMSESPSettingsService::begin() {
_fsPersistence.readFromFS(); _fsPersistence.readFromFS();
} }
void EMSESPSettingsService::save() {
_fsPersistence.writeToFS();
}
} // namespace emsesp } // namespace emsesp

View File

@@ -62,6 +62,7 @@ class EMSESPSettingsService : public StatefulService<EMSESPSettings> {
EMSESPSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager); EMSESPSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager);
void begin(); void begin();
void save();
private: private:
HttpEndpoint<EMSESPSettings> _httpEndpoint; HttpEndpoint<EMSESPSettings> _httpEndpoint;