Skip to content

Commit 3dcd658

Browse files
committed
style:> delete an empty line/#118
1 parent 46243f4 commit 3dcd658

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pro/src/main/java/com/example/pro/board/service/BoardService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,18 @@ public Board findBoard(Long boardId) {
4646
}
4747

4848
public BoardCountResponseDto findAllBoards() {
49+
long totalCount = boardRepository.count();
4950
List<Board> boards = boardRepository.findAll();
5051

5152
// 엔티티를 Dto로 변환하는 로직
5253
List<BoardListResponseDto> responses = boards.stream()
5354
.map(BoardListResponseDto::toBoardListDto)
5455
.collect(Collectors.toList());
55-
long count = boardRepository.count();
56-
return new BoardCountResponseDto(responses, count);
56+
return new BoardCountResponseDto(responses, totalCount);
5757
}
5858

5959
public List<Board> searchTitle(String title) {
6060
return boardRepository.findByTitle(title);
61-
6261
}
6362

6463
@Transactional

0 commit comments

Comments
 (0)