Skip to content

Commit

Permalink
refactor: 위도, 경도값 반환을 Accommodation에 위임 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
astraum committed Jun 9, 2022
1 parent c81195f commit bbb5f07
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ public List<String> getImageUrls() {
public boolean isNotNullName(Accommodation accommodation) {
return !accommodation.name.isEmpty();
}

public Double getLongitude() {
return location.getPosition().getLon();
}

public Double getLatitude() {
return location.getPosition().getLat();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public static AccommodationSearchElement from(Accommodation accommodation) {
.id(accommodation.getId())
.name(accommodation.getName())
.price(accommodation.getPrice())
.longitude(accommodation.getLocation().getPosition().getLon())
.latitude(accommodation.getLocation().getPosition().getLat())
.longitude(accommodation.getLongitude())
.latitude(accommodation.getLatitude())
.address(accommodation.getAddress())
.type(accommodation.getType().getDbData())
.hostName(accommodation.getHostName())
Expand Down

0 comments on commit bbb5f07

Please sign in to comment.