Skip to content

Commit

Permalink
[fix] catch unexpected error while using naver api
Browse files Browse the repository at this point in the history
  • Loading branch information
Parkjyun committed Mar 14, 2024
1 parent 313f99e commit 92f4cd8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/org/pingle/pingleserver/utils/NaverUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,11 @@ private NaverLocationResponse locationSearch(NaverLocationRequest request) throw
}

private List<LocationResponse> convertResponse(NaverLocationResponse response) {

List<NaverLocationResponse.SearchLocationItem> items = response.items();
List<LocationResponse> responseList = items
.stream()

return items.stream()
.map(item -> new LocationResponse(convertX(item.getMapx()), convertY(item.getMapy()), trim(item.getTitle()), trim(item.getAddress()), trim(item.getRoadAddress())))
.collect(Collectors.toList());

return responseList;
}
private double convertX(int x) {

Expand Down

0 comments on commit 92f4cd8

Please sign in to comment.