made userline not hardcoded

This commit is contained in:
Aditya Sankaran 2019-10-26 17:06:42 -04:00
parent 981795b288
commit 19780a1395

View File

@ -28,7 +28,7 @@ exports.putPost = (req, res) => {
};
exports.getallPostsforUser = (req, res) => {
admin.firestore().collection('posts').where('userHandle', '==', 'new user' ).get()
admin.firestore().collection('posts').where('userHandle', '==', req.userData.handle ).get()
.then((data) => {
let posts = [];
data.forEach(function(doc) {