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 @@ -29,6 +29,7 @@ public Board toEntity(User user, Game game, Club cheerClub, CreateOrUpdateBoardR
return Board.builder()
.title(boardRequest.getTitle())
.content(boardRequest.getContent())
.maxPerson(boardRequest.getMaxPerson())
.user(user)
.club(cheerClub)
.game(game)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Optional;

public interface BookMarkRepository extends JpaRepository<BookMark, Long> {
boolean existsByUserAndBoard(User user, Board board);
boolean existsByUserAndBoardAndDeletedAtIsNull(User user, Board board);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public StateResponse addBookMark(Long userId, Long boardId) {
throw new BaseException(ErrorCode.ALREADY_BOOKMARK);
}

if (bookMarkRepository.existsByUserAndBoard(user, board)) {
if (bookMarkRepository.existsByUserAndBoardAndDeletedAtIsNull(user, board)) {
throw new BaseException(ErrorCode.ALREADY_BOOKMARK);
}

Expand Down
Loading