Skip to content

Commit

Permalink
#7 fix: set status INACTIVE
Browse files Browse the repository at this point in the history
  • Loading branch information
5jisoo committed Aug 23, 2023
1 parent 11a0ff9 commit b4151cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.transaction.annotation.Transactional;

import static com.umc.place.common.BaseResponseStatus.*;
import static com.umc.place.common.Constant.INACTIVE;

@Service
@RequiredArgsConstructor
Expand Down Expand Up @@ -55,7 +56,7 @@ public Void deleteComment(Long storyIdx, Long commentIdx, Long ownerIdx) throws
throw new BaseException(NOT_OWNER);
}

commentRepository.delete(comment);
comment.setStatus(INACTIVE);
story.getComments().remove(comment); // 양방향 연관관계

return null;
Expand Down

0 comments on commit b4151cf

Please sign in to comment.