Merge pull request #34 from ClaytonWWilson/edit-profile-fix

Update fbAuth so the user data from firebase is stored in req.userData
This commit is contained in:
Clayton Wilson 2019-10-24 13:23:03 -04:00 committed by GitHub
commit de4018a6d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ module.exports = (req, res, next) => {
.then((data) => {
req.user.handle = data.docs[0].data().handle; // Save username
req.user.imageUrl = data.docs[0].data().imageUrl;
req.userData = data.docs[0].data(); // Stores all user data from the database
return next();
})
.catch((err) => {