Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ public interface BookMarkRepository extends JpaRepository<BookMark, Long> {

Page<BookMark> findAllByUserIdAndDeletedAtIsNull(Long userId, Pageable pageable);

boolean existsByUserIdAndBoardId(Long userId, Long boardId);
boolean existsByUserIdAndBoardIdAndDeletedAtIsNull(Long userId, Long boardId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public BoardInfo getBoard(Long userId, Long boardId) {
Board board = boardRepository.findByIdAndDeletedAtIsNullAndIsCompleted(boardId)
.orElseThrow(() -> new BaseException(ErrorCode.BOARD_NOT_FOUND));

boolean isBookMarked = bookMarkRepository.existsByUserIdAndBoardId(user.getId(), board.getId());
boolean isBookMarked = bookMarkRepository.existsByUserIdAndBoardIdAndDeletedAtIsNull(user.getId(), board.getId());

// 타 유저 게시물 여부 확인
boolean isOwnBoard = board.isWriterSameAsLoginUser(user);
Expand Down
Loading