mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 13:15:05 +00:00
Add post id
This commit is contained in:
@@ -17,6 +17,7 @@ exports.putPost = (req, res) => {
|
||||
|
||||
admin.firestore().collection('posts').add(newPost)
|
||||
.then((doc) => {
|
||||
doc.update({postId: doc.id})
|
||||
const resPost = newPost;
|
||||
resPost.postId = doc.id;
|
||||
return res.status(200).json(resPost);
|
||||
@@ -67,4 +68,4 @@ exports.getallPosts = (req, res) => {
|
||||
|
||||
exports.getFilteredPosts = (req, res) => {
|
||||
admin.firestore().collection('posts').where('userHandle', '==', 'new user').where('microBlogTopics', '==')
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user