Last active
June 23, 2017 23:32
-
-
Save kaueDM/43eac7290be0d8d907935f17858045ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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) => { | |
return new Promise((resolve, reject) => { | |
const ref = database | |
.ref('user_data') | |
.child(userUID) | |
.child('customers') | |
.on('value', snap => { | |
(snap.val() ? resolve(snap.val()) : reject({'message': 'Empty Firebase node'})) | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment