From 9b1e163ba6bd63d0156f72fb7833c16d301cf4f3 Mon Sep 17 00:00:00 2001 From: dong_yxxn Date: Fri, 15 Nov 2024 04:19:13 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]:=20Category=20Enum=EB=AA=85=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20api=20=ED=98=B8=EC=B6=9C=EC=9D=B4=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=ED=96=88=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존 api 보낼때, Category는 한글이름으로 입력했어야했는데 영어로 가능하게 변경했습니다. --- .../java/team7/inplace/place/application/PlaceService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/team7/inplace/place/application/PlaceService.java b/src/main/java/team7/inplace/place/application/PlaceService.java index c8b061ab..0fb0161f 100644 --- a/src/main/java/team7/inplace/place/application/PlaceService.java +++ b/src/main/java/team7/inplace/place/application/PlaceService.java @@ -25,6 +25,7 @@ import team7.inplace.place.application.dto.LikedPlaceInfo; import team7.inplace.place.application.dto.PlaceDetailInfo; import team7.inplace.place.application.dto.PlaceInfo; +import team7.inplace.place.domain.Category; import team7.inplace.place.domain.Place; import team7.inplace.place.persistence.PlaceRepository; import team7.inplace.placeMessage.application.command.PlaceMessageCommand; @@ -55,7 +56,10 @@ public Page getPlacesWithinRadius( // categories와 influencers 필터 처리 List categoryFilters = placesFilterParamsCommand.isCategoryFilterExists() - ? Arrays.stream(placesFilterParamsCommand.categories().split(",")).toList() + ? Arrays.stream(placesFilterParamsCommand.categories().split(",")) + .map(Category::of) + .map(Category::name) + .toList() : null; List influencerFilters = placesFilterParamsCommand.isInfluencerFilterExists() From e1e1b8709dd6c25b9eb79f6db5d687f1f23d2409 Mon Sep 17 00:00:00 2001 From: dong_yxxn Date: Fri, 15 Nov 2024 04:37:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=20Category.Of=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=98=81=EC=96=B4=EB=A1=9C=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EA=B0=80=EB=8A=A5=ED=95=98=EA=B2=8C=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/team7/inplace/place/domain/Category.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/team7/inplace/place/domain/Category.java b/src/main/java/team7/inplace/place/domain/Category.java index 8469478e..faa42096 100644 --- a/src/main/java/team7/inplace/place/domain/Category.java +++ b/src/main/java/team7/inplace/place/domain/Category.java @@ -17,7 +17,7 @@ public enum Category { public static Category of(String name) { for (Category category : values()) { - if (category.name.equals(name)) { + if (category.name.equalsIgnoreCase(name) || category.name().equalsIgnoreCase(name)) { return category; } }