Skip to content

Commit

Permalink
Merge branch 'test/post-pagination' of https://github.com/Gongjakso/s…
Browse files Browse the repository at this point in the history
…erver into test/post-pagination
  • Loading branch information
yumzen committed May 23, 2024
2 parents 6af4ca9 + 4354a9d commit 8af601f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ public PostScrapRes scrapPost(Member member, Long postId) {
post.setScrapCount(post.getScrapCount() + 1);
}
}
postScrapRepository.save(postScrap);
postRepository.save(post);
return PostScrapRes.of(postScrap, post.getScrapCount());
PostScrap savePostScrap = postScrapRepository.save(postScrap);
Post savePost = postRepository.save(post);
return PostScrapRes.of(savePostScrap, savePost.getScrapCount());
}

@Transactional
Expand Down

0 comments on commit 8af601f

Please sign in to comment.