Skip to content

Commit

Permalink
feat : [kakao-tech-campus-2nd-step3#45] 상품 상세 조회시 관련 이미지 url 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyter471 committed Oct 22, 2024
1 parent ec89e14 commit dcd12d1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ public record ProductResponse(
String description,
String preferredLocation,
List<HashTag> hashTags,
ArtistInfo artistInfo
ArtistInfo artistInfo,
List<String> imageUrls
) {
public record ArtistInfo(Long artistId, String artistName) {
}

public static ProductResponse from(Product product) {
public static ProductResponse from(Product product, List<String> urls) {
return new ProductResponse(
product.getId(),
product.getName(),
Expand All @@ -29,7 +30,8 @@ public static ProductResponse from(Product product) {
product.getDescription(),
product.getPreferredLocation(),
product.getHashTags(),
new ArtistInfo(product.getArtistInfo().getId(),product.getArtistInfo().getNickname())
new ArtistInfo(product.getArtistInfo().getId(),product.getArtistInfo().getNickname()),
urls
);
}
}

0 comments on commit dcd12d1

Please sign in to comment.