Skip to content

Commit

Permalink
fix: 스타카토 조회 시 위도 경도까지 반환하도록 변경 (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
devhoya97 authored Sep 25, 2024
1 parent cabe0c0 commit 6a288aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.staccato.moment.service.dto.response;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

Expand Down Expand Up @@ -30,6 +31,10 @@ public record MomentDetailResponse(
String placeName,
@Schema(example = "서울 용산구 남산공원길 105")
String address,
@Schema(example = "51.51978412729915")
BigDecimal latitude,
@Schema(example = "-0.12712788587027796")
BigDecimal longitude,
List<CommentResponse> comments
) {
public MomentDetailResponse(Moment moment) {
Expand All @@ -43,6 +48,8 @@ public MomentDetailResponse(Moment moment) {
moment.getFeeling().getValue(),
moment.getSpot().getPlaceName(),
moment.getSpot().getAddress(),
moment.getSpot().getLatitude(),
moment.getSpot().getLongitude(),
moment.getComments().stream().map(CommentResponse::new).toList()
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.staccato.fixture.moment;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

Expand All @@ -17,6 +18,8 @@ public static MomentDetailResponse create(long momentId, LocalDateTime visitedAt
"happy",
"placeName",
"address",
new BigDecimal("37.77490000000000"),
new BigDecimal("-122.41940000000000"),
List.of());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import com.staccato.moment.domain.MomentImages;

public class MomentFixture {
private static final BigDecimal latitude = new BigDecimal("37.7749");
private static final BigDecimal longitude = new BigDecimal("-122.4194");
private static final BigDecimal latitude = new BigDecimal("37.77490000000000");
private static final BigDecimal longitude = new BigDecimal("-122.41940000000000");

public static Moment create(Memory memory) {
return Moment.builder()
Expand Down

0 comments on commit 6a288aa

Please sign in to comment.