Created
August 23, 2018 00:11
-
-
Save javebratt/6e72d5f5cd40d8c8865e2319a305b459 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
getUserProfile(): Promise<firebase.database.Reference> { | |
return new Promise((resolve, reject) => { | |
firebase.auth().onAuthStateChanged(user => { | |
if (user) { | |
const userProfile = firebase.database().ref(`/userProfile/${user.uid}`); | |
resolve(userProfile) | |
} else { | |
reject(false) | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment