Fixing 'firebase deploy' errors and warnings

This commit is contained in:
2019-09-29 23:59:36 -04:00
parent 5176f0250c
commit 90442fe3cd
3 changed files with 8 additions and 4 deletions

View File

@@ -17,11 +17,11 @@ exports.putPost = (req, res) => {
.then((doc) => {
const resPost = newPost;
resPost.postId = doc.id;
res.json(resPost);
return res.status(200).json(resPost);
})
.catch((err) => {
res.status(500).json({ error: 'something is wrong'});
console.error(err);
return res.status(500).json({ error: 'something is wrong'});
});
};