Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tibetsprague committed Nov 14, 2023
2 parents 565170a + 89485c3 commit 3968660
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions api/models/post/updatePost.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ export function afterUpdatingPost (post, opts) {
transacting
} = opts

console.log("post type", post.get('type'), post)
return post.ensureLoad(['groups'])
.then(() => Promise.all([
updateChildren(post, requests, transacting),
updateGroups(post, group_ids, transacting),
updateAllMedia(post, params, transacting),
Tag.updateForPost(post, topicNames, userId, transacting),
updateFollowers(post, transacting)
]))
.then(() => memberIds && post.setProjectMembers(memberIds, {transacting}))
.then(() => eventInviteeIds && post.updateEventInvitees(eventInviteeIds, userId, {transacting}))
.then(() => Promise.all([
updateChildren(post, requests, transacting),
updateGroups(post, group_ids, transacting),
updateAllMedia(post, params, transacting),
Tag.updateForPost(post, topicNames, userId, transacting),
updateFollowers(post, transacting)
]))
.then(() => post.get('type') === 'project' && memberIds && post.setProjectMembers(memberIds, { transacting }))
.then(() => post.get('type') === 'event' && eventInviteeIds && post.updateEventInvitees(eventInviteeIds, userId, { transacting }))
}

0 comments on commit 3968660

Please sign in to comment.