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 {
}
});
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
Post a Comment