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; }