Merge branch 'master' into userline

This commit is contained in:
asankaran35
2019-09-30 18:23:21 -04:00
committed by GitHub
9 changed files with 267 additions and 93 deletions

View File

@@ -18,12 +18,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'});
});
};