Closed maylortaylor closed 3 years ago
If you want to check the node path existent, please use pathExist function.
if(Firebase.pathExist(firebaseData, "path to check"))
{
//node found
}
I tried this but I get a compilation error. I confirmed I have version 3.8.9 of the Firebase ESP32 Client by Mobizt
error: 'class FirebaseESP32' has no member named 'pathExists'
if (Firebase.pathExists(firebaseData, path)) {
Typo in your command pathExist not pathExists. https://github.com/mobizt/Firebase-ESP32/tree/master/src#determine-whether-defined-database-path-exists-or-not
I am trying to get a simple user creation logic flow but can't quite seem to get the "does user exist" code to work correctly.
I am doing a
Firebase.get()
to see if thepath
exists. I thought this function returnstrue
only if it has a200 Response
and it finds something.I've tested this multiple times and It will continuously keep creating this user (updating that
createDate
variable I made). Am I doing this wrong?I just want to create the user one time and then
on boot
of the ESP32, I can just check "does that user/object exist", ifyes
then don't create a user again.