We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94bb3a9 commit 7709484Copy full SHA for 7709484
src/components/Firebase/firebase.js
@@ -1,5 +1,6 @@
1
import app from 'firebase/app';
2
import 'firebase/auth';
3
+import 'firebase/database';
4
5
const config = {
6
apiKey: process.env.REACT_APP_API_KEY,
@@ -15,6 +16,7 @@ class Firebase {
15
16
app.initializeApp(config);
17
18
this.auth = app.auth();
19
+ this.db = app.database();
20
}
21
22
// *** Auth API ***
@@ -31,6 +33,12 @@ class Firebase {
31
33
32
34
doPasswordUpdate = password =>
35
this.auth.currentUser.updatePassword(password);
36
+
37
+ // *** User API ***
38
39
+ user = uid => this.db.ref(`users/${uid}`);
40
41
+ users = () => this.db.ref('users');
42
43
44
export default Firebase;
0 commit comments