Skip to content

Commit

Permalink
fix: post is deleted regardless of whether isQuestion is set
Browse files Browse the repository at this point in the history
  • Loading branch information
becooq81 committed Jul 24, 2024
1 parent c2a6050 commit 567516a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/poolc/api/post/service/PostService.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void unscrapPost(Member member, Long postId) {
public void deletePost(Member member, Long postId) {
Post post = findById(member, postId);
checkWriterOrAdmin(member, post);
if (!post.getIsQuestion()) {
if (post.getIsQuestion() == null || !post.getIsQuestion()) {
post.setIsDeleted();
}
BoardType.removePostCount(post.getBoardType());
Expand Down

0 comments on commit 567516a

Please sign in to comment.