API updates

This commit is contained in:
Proddy
2023-12-28 14:25:39 +01:00
parent b928ad89d9
commit 8cd0a9a761
25 changed files with 174 additions and 178 deletions

View File

@@ -63,16 +63,15 @@ class FSPersistence {
// serialize it to filesystem
File settingsFile = _fs->open(_filePath, "w");
#ifdef EMSESP_DEBUG
Serial.println("Writing settings to " + String(_filePath));
#endif
// failed to open file, return false
if (!settingsFile || !jsonObject.size()) {
return false;
}
// serialize the data to the file
// serialize the data to the file
#ifdef EMSESP_DEBUG
Serial.println("Writing settings to " + String(_filePath));
#endif
serializeJson(jsonDocument, settingsFile);
settingsFile.close();
return true;