Merge branch 'master' of github.com:ClaytonWWilson/CS307-Team24

added Navigation bar
This commit is contained in:
Leon Liang
2019-10-01 12:45:10 -04:00
7 changed files with 59 additions and 13 deletions

View File

@@ -10,6 +10,10 @@ exports.getProfileInfo = (req, res) => {
db.collection('users').doc(req.user.handle).get()
.then((data) => {
return res.status(200).json(data.data());
})
.catch((err) => {
console.error(err);
return res.status(500).json(err);
});
};
@@ -42,7 +46,7 @@ exports.updateProfileInfo = (req, res) => {
exports.getUserDetails = (req, res) => {
let userData = {};
db.doc('/users/${req.params.handle}').get().then((doc) => {
db.doc(`/users/${req.params.handle}`).get().then((doc) => {
if (doc.exists) {
userData.user = doc.data();
return db.collection('post').where('userHandle', '==', req.params.handle)