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 @@ -12,7 +12,7 @@
public interface BookMarkRepository extends JpaRepository<BookMark, Long> {
boolean existsByUserAndBoardAndDeletedAtIsNull(User user, Board board);

Optional<BookMark> findByUserIdAndBoardId(Long userId, Long boardId);
Optional<BookMark> findByUserIdAndBoardIdAndDeletedAtIsNull(Long userId, Long boardId);

Page<BookMark> findAllByUserIdAndDeletedAtIsNull(Long userId, Pageable pageable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public StateResponse removeBookMark(Long userId, Long boardId) {
Board board = boardRepository.findById(boardId)
.orElseThrow(() -> new BaseException(ErrorCode.BOARD_NOT_FOUND));

BookMark bookMark = bookMarkRepository.findByUserIdAndBoardId(user.getId(), board.getId())
BookMark bookMark = bookMarkRepository.findByUserIdAndBoardIdAndDeletedAtIsNull(user.getId(), board.getId())
.orElseThrow(() -> new BaseException(ErrorCode.BOOKMARK_NOT_FOUND));

bookMark.delete();
Expand Down
Loading