diff --git a/src/main/java/com/example/template/domain/board/dto/response/BoardResponseDTO.java b/src/main/java/com/example/template/domain/board/dto/response/BoardResponseDTO.java index 3eb3ffc..53609e2 100644 --- a/src/main/java/com/example/template/domain/board/dto/response/BoardResponseDTO.java +++ b/src/main/java/com/example/template/domain/board/dto/response/BoardResponseDTO.java @@ -30,15 +30,15 @@ public static class BoardDTO { private String content; private Category category; private HelpStatus helpStatus; - private Boolean isAuthor; - private Boolean isLiked; + private boolean isAuthor; + private boolean isLiked; private Integer likeNum; private Integer commentCount; private LocalDateTime createdAt; private LocalDateTime updatedAt; private List images; - public static BoardDTO from(Board board, Long currentMemberId, Boolean isLiked) { + public static BoardDTO from(Board board, Long currentMemberId, boolean isLiked) { return BoardDTO.builder() .id(board.getId()) .memberId(board.getMember().getId()) @@ -100,7 +100,7 @@ public static class BoardLikeDTO { private boolean isLiked; private Integer likeCount; - public static BoardLikeDTO from(Board board, Long currentMemberId, Boolean isLiked) { + public static BoardLikeDTO from(Board board, Long currentMemberId, boolean isLiked) { return BoardLikeDTO.builder() .memberId(currentMemberId) .boardId(board.getId()) diff --git a/src/main/java/com/example/template/domain/board/service/commandService/BoardCommandServiceImpl.java b/src/main/java/com/example/template/domain/board/service/commandService/BoardCommandServiceImpl.java index 1518472..0696ba1 100644 --- a/src/main/java/com/example/template/domain/board/service/commandService/BoardCommandServiceImpl.java +++ b/src/main/java/com/example/template/domain/board/service/commandService/BoardCommandServiceImpl.java @@ -133,7 +133,7 @@ public BoardResponseDTO.BoardDTO updateBoard(Long boardId, } } Board updatedBoard = boardRepository.save(board); - Boolean isLiked = boardLikeRepository.existsByMemberAndBoard(member, updatedBoard); + boolean isLiked = boardLikeRepository.existsByMemberAndBoard(member, updatedBoard); return BoardResponseDTO.BoardDTO.from(updatedBoard, member.getId(), isLiked); } diff --git a/src/main/java/com/example/template/domain/board/service/queryService/BoardQueryServiceImpl.java b/src/main/java/com/example/template/domain/board/service/queryService/BoardQueryServiceImpl.java index 6e7ee6c..9dca891 100644 --- a/src/main/java/com/example/template/domain/board/service/queryService/BoardQueryServiceImpl.java +++ b/src/main/java/com/example/template/domain/board/service/queryService/BoardQueryServiceImpl.java @@ -42,7 +42,7 @@ public BoardResponseDTO.BoardDTO getBoardDetail(Long boardId, Member member) { Board board = boardRepository.findById(boardId) .orElseThrow(() -> new BoardException(BoardErrorCode.BOARD_NOT_FOUND)); - Boolean isLiked = boardLikeRepository.existsByMemberAndBoard(member, board); + boolean isLiked = boardLikeRepository.existsByMemberAndBoard(member, board); return BoardResponseDTO.BoardDTO.from(board, member.getId(), isLiked); }