mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-21 23:48:07 +01:00
Fix null characters in status json
This commit is contained in:
parent
a9ca2150d4
commit
4d5122eb24
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ void onStatus(AsyncWebServerRequest *request)
|
|||
AsyncResponseStream *response = request->beginResponseStream("application/json");
|
||||
|
||||
StaticJsonDocument<96> root;
|
||||
root["files"]["selected"] = preferences.getString(SELECTED_FILE, "").c_str();
|
||||
String file = preferences.getString(SELECTED_FILE, "");
|
||||
root["files"]["selected"] = file.c_str();
|
||||
|
||||
JsonObject volume = root.createNestedObject("volume");
|
||||
byte currentVolume = preferences.getUChar(CURRENT_VOLUME);
|
||||
|
|
Loading…
Reference in a new issue