connecting

This commit is contained in:
Aditya Sankaran
2019-11-01 04:42:44 -04:00
parent 12938e8e9a
commit 6dbca16ace
5 changed files with 62 additions and 26 deletions

View File

@@ -118,8 +118,13 @@ exports.getallPostsforFeed = (req, res) => {
admin.firestore().collection('posts').get()
.then((data) => {
let posts = [];
data.forEach(function(doc) {
posts.push(doc.data());
posts.push( {
microBlogs: doc.data(),
id: doc.id,
})
});
return res.status(200).json(posts);
})