diff --git a/src/main/java/org/gachon/checkmate/domain/post/controller/PostController.java b/src/main/java/org/gachon/checkmate/domain/post/controller/PostController.java index 6247135..f64fdfd 100644 --- a/src/main/java/org/gachon/checkmate/domain/post/controller/PostController.java +++ b/src/main/java/org/gachon/checkmate/domain/post/controller/PostController.java @@ -15,11 +15,11 @@ public class PostController { private final PostService postService; - @GetMapping("/search") - public ResponseEntity> searchTextPost(@UserId final Long userId, - @RequestParam final String text, - final Pageable pageable) { - final PostSearchResponseDto responseDto = postService.searchTextPost(userId, text, pageable); + @GetMapping + public ResponseEntity> getAllPosts(@UserId final Long userId, + @RequestParam final String type, + final Pageable pageable){ + final PostSearchResponseDto responseDto = postService.getAllPosts(userId, type, pageable); return SuccessResponse.ok(responseDto); } @@ -31,4 +31,12 @@ public ResponseEntity> searchKeyWordPost(@UserId final Long u final PostSearchResponseDto responseDto = postService.searchKeyWordPost(userId, key, type, pageable); return SuccessResponse.ok(responseDto); } + + @GetMapping("/search") + public ResponseEntity> searchTextPost(@UserId final Long userId, + @RequestParam final String text, + final Pageable pageable) { + final PostSearchResponseDto responseDto = postService.searchTextPost(userId, text, pageable); + return SuccessResponse.ok(responseDto); + } }