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