mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +00:00
Add post id
This commit is contained in:
parent
d6876eab0b
commit
b01aa92f96
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user