-
-
Save lubien/82a431ed99194fc0ab6a5a09751bfb81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getAll = userUID => | |
database | |
.ref('user_data') | |
.child(userUID) | |
.child('customers') | |
// exemplo de uso: | |
getAll(myUserId).on('value', snap => { | |
const value = snap.val() | |
if (value) { | |
// do something | |
} else { | |
console.error({message: 'Empty Firebase node'}) | |
// do something | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment