From f8df6bd28c75ebe0c09b9c839556a63db316ce6a Mon Sep 17 00:00:00 2001 From: tnals2384 Date: Tue, 10 Sep 2024 21:32:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20#139=20=EB=A9=94=EC=84=9C=EB=93=9C=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../capple/domain/board/controller/BoardController.java | 6 +++--- .../server/capple/domain/board/service/BoardService.java | 2 +- .../capple/domain/board/service/BoardServiceImpl.java | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/server/capple/domain/board/controller/BoardController.java b/src/main/java/com/server/capple/domain/board/controller/BoardController.java index 238b77fd..5bac4fe5 100644 --- a/src/main/java/com/server/capple/domain/board/controller/BoardController.java +++ b/src/main/java/com/server/capple/domain/board/controller/BoardController.java @@ -39,7 +39,7 @@ private BaseResponse createBoard( @ApiResponse(responseCode = "COMMON200", description = "성공"), }) @GetMapping("/redis") - private BaseResponse getBoardsByBoardType( + private BaseResponse getBoardsByBoardTypeWithRedis( @AuthMember Member member, @RequestParam(name = "boardType", required = false) BoardType boardType // TODO: 페이징 프론트 이슈로 추후 구현 @@ -53,13 +53,13 @@ private BaseResponse getBoardsByBoardType( @ApiResponse(responseCode = "COMMON200", description = "성공"), }) @GetMapping() - private BaseResponse getBoardsByBoardTypeWithRDB( + private BaseResponse getBoardsByBoardType( @AuthMember Member member, @RequestParam(name = "boardType", required = false) BoardType boardType // TODO: 페이징 프론트 이슈로 추후 구현 // @PageableDefault(sort = "created_at", direction = Sort.Direction.DESC) @Parameter(hidden = true) Pageable pageable ) { - return BaseResponse.onSuccess(boardService.getBoardsByBoardTypeWithRDB(member, boardType)); + return BaseResponse.onSuccess(boardService.getBoardsByBoardType(member, boardType)); } @Operation(summary = "게시글 삭제 API", description = "게시글을 삭제합니다.") diff --git a/src/main/java/com/server/capple/domain/board/service/BoardService.java b/src/main/java/com/server/capple/domain/board/service/BoardService.java index f3673229..2062bbb1 100644 --- a/src/main/java/com/server/capple/domain/board/service/BoardService.java +++ b/src/main/java/com/server/capple/domain/board/service/BoardService.java @@ -8,7 +8,7 @@ public interface BoardService { BoardCreate createBoard(Member member, BoardType boardType, String content); - BoardsGetByBoardType getBoardsByBoardTypeWithRDB(Member member, BoardType boardType); + BoardsGetByBoardType getBoardsByBoardTypeWithRedis(Member member, BoardType boardType); BoardsGetByBoardType getBoardsByBoardType(Member member, BoardType boardType); diff --git a/src/main/java/com/server/capple/domain/board/service/BoardServiceImpl.java b/src/main/java/com/server/capple/domain/board/service/BoardServiceImpl.java index e777ea1b..5b658be3 100644 --- a/src/main/java/com/server/capple/domain/board/service/BoardServiceImpl.java +++ b/src/main/java/com/server/capple/domain/board/service/BoardServiceImpl.java @@ -42,9 +42,8 @@ public BoardResponse.BoardCreate createBoard(Member member, BoardType boardType, } //redis - @Override - public BoardResponse.BoardsGetByBoardType getBoardsByBoardType(Member member, BoardType boardType) { + public BoardResponse.BoardsGetByBoardType getBoardsByBoardTypeWithRedis(Member member, BoardType boardType) { List boards; if (boardType == null) { boards = boardRepository.findAll(); @@ -69,7 +68,7 @@ public BoardResponse.BoardsGetByBoardType getBoardsByBoardType(Member member, Bo //rdb @Override - public BoardResponse.BoardsGetByBoardType getBoardsByBoardTypeWithRDB(Member member, BoardType boardType) { + public BoardResponse.BoardsGetByBoardType getBoardsByBoardType(Member member, BoardType boardType) { List boards; if (boardType == null) { boards = boardRepository.findAll();