mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 18:28:47 +00:00
Update fbAuth so the user data from firebase is stored in req.userData
This commit is contained in:
parent
c5942a6634
commit
b17fb1f3f0
@ -32,6 +32,7 @@ module.exports = (req, res, next) => {
|
|||||||
.then((data) => {
|
.then((data) => {
|
||||||
req.user.handle = data.docs[0].data().handle; // Save username
|
req.user.handle = data.docs[0].data().handle; // Save username
|
||||||
req.user.imageUrl = data.docs[0].data().imageUrl;
|
req.user.imageUrl = data.docs[0].data().imageUrl;
|
||||||
|
req.userData = data.docs[0].data(); // Stores all user data from the database
|
||||||
return next();
|
return next();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user