From 04da46390926459455090b39a500d4a322ecbf65 Mon Sep 17 00:00:00 2001 From: Hanvp Date: Tue, 29 Aug 2023 17:55:46 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Feature/82=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=EB=A0=88=EC=8B=9C=ED=94=BC=20=EC=9C=A0=EC=A0=80img=20json=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/zipdabang/server/converter/RecipeConverter.java | 6 +++--- .../server/web/dto/responseDto/RecipeResponseDto.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/zipdabang/server/converter/RecipeConverter.java b/src/main/java/zipdabang/server/converter/RecipeConverter.java index 7d71160..46f6e12 100644 --- a/src/main/java/zipdabang/server/converter/RecipeConverter.java +++ b/src/main/java/zipdabang/server/converter/RecipeConverter.java @@ -130,9 +130,8 @@ public static RecipeResponseDto.RecipeStatusDto toRecipeStatusDto(Recipe recipe) public static RecipeResponseDto.RecipeInfoDto toRecipeInfoDto(Recipe recipe, Boolean isOwner, Boolean isLiked, Boolean isScrapped, Member member) { return RecipeResponseDto.RecipeInfoDto.builder() - .recipeInfo(toResponseRecipeDto(recipe, isLiked, isScrapped)) + .recipeInfo(toResponseRecipeDto(recipe, isLiked, isScrapped, member)) .isOwner(isOwner) - .ownerImage(member.getProfileUrl()) .steps(toResponseStepDto(recipe)) .ingredients(toResponseIngredientDto(recipe)) .build(); @@ -164,12 +163,13 @@ public static List getCategoryIds(Recipe recipe){ .collect(Collectors.toList()); } - public static RecipeResponseDto.RecipeDto toResponseRecipeDto(Recipe recipe, Boolean isLiked, Boolean isScrapped){ + public static RecipeResponseDto.RecipeDto toResponseRecipeDto(Recipe recipe, Boolean isLiked, Boolean isScrapped, Member member){ return RecipeResponseDto.RecipeDto.builder() .recipeId(recipe.getId()) .categoryId(getCategoryIds(recipe)) .recipeName(recipe.getName()) + .ownerImage(member.getProfileUrl()) .nickname(recipe.getMember().getNickname()) .thumbnailUrl(recipe.getThumbnailUrl()) .time(recipe.getTime()) diff --git a/src/main/java/zipdabang/server/web/dto/responseDto/RecipeResponseDto.java b/src/main/java/zipdabang/server/web/dto/responseDto/RecipeResponseDto.java index 2e1423e..669c66f 100644 --- a/src/main/java/zipdabang/server/web/dto/responseDto/RecipeResponseDto.java +++ b/src/main/java/zipdabang/server/web/dto/responseDto/RecipeResponseDto.java @@ -46,6 +46,7 @@ public static class RecipeDto { private Long recipeId; List categoryId; private String recipeName; + private String ownerImage; private String nickname; private String thumbnailUrl; private String time; @@ -88,7 +89,6 @@ public static class RecipePageListDto { public static class RecipeInfoDto { private RecipeDto recipeInfo; private boolean isOwner; - private String ownerImage; private List steps; private List ingredients; }