diff --git a/backend/src/main/java/com/bootme/post/service/PostService.java b/backend/src/main/java/com/bootme/post/service/PostService.java index 3eaa15e9..b292fa4c 100644 --- a/backend/src/main/java/com/bootme/post/service/PostService.java +++ b/backend/src/main/java/com/bootme/post/service/PostService.java @@ -83,7 +83,7 @@ public CustomPageImpl findAllPosts(Long memberId, int page, int si boolean isLogin = authService.validateLogin(memberId); Predicate combinedPredicate = getCombinedPredicate(params); Set viewedPosts = getViewedPosts(); - String topic = params.get("topic").get(0); + String topic = params.getOrDefault("topic", Collections.singletonList("")).get(0); String search = params.getOrDefault("search", Collections.singletonList("")).get(0); Page postResponses = postRepositoryProxy.getPostPage(page, size, sort, topic, search, combinedPredicate)