Skip to content

Commit

Permalink
fix: topic object in post editing data return
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 28, 2020
1 parent a4f3270 commit 3c98cd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/posts.js
Expand Up @@ -48,6 +48,7 @@ postsAPI.edit = async function (caller, data) {
}
const postObj = await posts.getPostSummaryByPids([editResult.post.pid], caller.uid, {});
const returnData = { ...postObj[0], ...editResult.post };
returnData.topic = { ...postObj[0].topic, ...editResult.post.topic };

if (!editResult.post.deleted) {
websockets.in('topic_' + editResult.topic.tid).emit('event:post_edited', editResult);
Expand Down

0 comments on commit 3c98cd3

Please sign in to comment.