Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Firebase.readEvent() returns "type" instead "put" while getting data from Firebase #374

Merged
merged 16 commits into from
Aug 15, 2018
Merged
Prev Previous commit
Next Next commit
Give up...
  • Loading branch information
kptdobe committed Aug 15, 2018
commit f1c940d97ffdeded6c749b539a0c90af34d635ee
4 changes: 1 addition & 3 deletions src/FirebaseArduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ FirebaseObject FirebaseArduino::readEvent() {
String event = client->readStringUntil('\n').substring(6);
client->readStringUntil('\n'); // consume separator
FirebaseObject obj = FirebaseObject(event.c_str());
JsonObject& jsonObject = obj.getJsonVariant().as<JsonObject&>();
jsonObject.set("type", "");
jsonObject.set("type", type);
obj.getJsonVariant().as<JsonObject&>().set("type", type);
return obj;
}

Expand Down