Skip to content

Commit

Permalink
✨ Feature/82 상세레시피 유저img json 위치 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanvp committed Aug 29, 2023
1 parent 0bc5745 commit 04da463
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/zipdabang/server/converter/RecipeConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -164,12 +163,13 @@ public static List<Long> 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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static class RecipeDto {
private Long recipeId;
List<Long> categoryId;
private String recipeName;
private String ownerImage;
private String nickname;
private String thumbnailUrl;
private String time;
Expand Down Expand Up @@ -88,7 +89,6 @@ public static class RecipePageListDto {
public static class RecipeInfoDto {
private RecipeDto recipeInfo;
private boolean isOwner;
private String ownerImage;
private List<StepDto> steps;
private List<IngredientDto> ingredients;
}
Expand Down

0 comments on commit 04da463

Please sign in to comment.