Skip to content

Commit

Permalink
feat: 반환 값에 사진 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
anstjgus922 committed Jul 30, 2024
1 parent ec6f223 commit 2c7f650
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ public List<Map<String, Object>> findPlaces(double latitude, double longitude, i
place.put("types", resultNode.path("types").toString());
place.put("placeID", resultNode.path("place_id").asText());

JsonNode photosNode = resultNode.path("photos");
if (photosNode.isArray() && photosNode.size() > 0) {
place.put("photo", photosNode.get(0).path("photo_reference").asText());
} else {
place.put("photo", null);
}

places.add(place);
}

Expand Down

0 comments on commit 2c7f650

Please sign in to comment.