Skip to content

Commit 1f527a6

Browse files
authored
[fix] 장소 관련 response 수정 (#242)
* fix: 장소 검색 시 사진이 없으면 null 처리 * fix: isVisited 필드명 변경
1 parent cc6b15c commit 1f527a6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/main/java/umc/catchy/domain/mapping/placeCourse/dto/response/PlaceInfoDetail.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public class PlaceInfoDetail {
2020
private Long reviewCount;
2121
private Double placeLatitude;
2222
private Double placeLongitude;
23-
private boolean visited;
23+
private boolean isVisited;
2424
private boolean liked;
2525
}

src/main/java/umc/catchy/domain/mapping/placeCourse/service/PlaceCourseService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ private String parsePlaceImageFromJson(String response) throws Exception {
366366
}
367367
}
368368

369+
if (photoReference.isBlank()) return null;
370+
369371
// photo_reference로 photo_url 받아오기
370372
String query = String.format(
371373
"photo?maxwidth=400&photoreference=%s&key=GOOGLE_API_KEY",

src/main/java/umc/catchy/domain/place/converter/PlaceConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static PlaceInfoDetail toPlaceInfoDetail (Place place, Long reviewCount,
7878
.reviewCount(reviewCount)
7979
.placeLatitude(place.getLatitude())
8080
.placeLongitude(place.getLongitude())
81-
.visited(isVisited)
81+
.isVisited(isVisited)
8282
.liked(isLiked)
8383
.build();
8484
}

0 commit comments

Comments
 (0)