Firebase Check Exhist and Then

Firebase nodejs operations are async and the request like check the exhistance and then proceed with reminder need to be done is sync way using promises .


This requires to done using firebase admin client if you are developing rest api and  follwing function is a example for it.


usersRef.orderByChild('email').equalTo(result.email).once('value').then(function(snapshot) {
                    isExhist= snapshot.exists();
                      if (isExhist) {

                       }
                  else {

                   }

});

Comments

Popular posts from this blog

ENOENT: no such file or directory, rename : node_modules/async

react-quill Integrate quill-image-resize-module