diff --git a/src/main/java/zipdabang/server/converter/RecipeConverter.java b/src/main/java/zipdabang/server/converter/RecipeConverter.java index 95cebfe..977f613 100644 --- a/src/main/java/zipdabang/server/converter/RecipeConverter.java +++ b/src/main/java/zipdabang/server/converter/RecipeConverter.java @@ -748,7 +748,7 @@ public static TestRecipe toTestRecipe(RecipeRequestDto.CreateRecipeDto request, } public static CompletableFuture> toTestRecipeCategory(List categoryIds, TestRecipe recipe) { - return CompletableFuture.completedFuture(categoryIds.stream() + return CompletableFuture.completedFuture(categoryIds.stream().parallel() .map(recipeCategoryId -> toTestRecipeCategoryMappingDto(recipeCategoryId, recipe)) .collect(Collectors.toList())); } @@ -762,7 +762,7 @@ private static TestRecipeCategoryMapping toTestRecipeCategoryMappingDto(Long cat } public static CompletableFuture> toTestStep(RecipeRequestDto.CreateRecipeDto request, TestRecipe recipe, List stepImages) { - return CompletableFuture.completedFuture(request.getSteps().stream() + return CompletableFuture.completedFuture(request.getSteps().stream().parallel() .map(step-> { if (step.getDescription() == null) throw new RecipeException(CommonStatus.NULL_RECIPE_ERROR); @@ -806,7 +806,7 @@ private static TestStep toTestStepDto(RecipeRequestDto.StepDto step, TestRecipe } public static CompletableFuture> toTestIngredient(RecipeRequestDto.CreateRecipeDto request, TestRecipe recipe) { - return CompletableFuture.completedFuture(request.getIngredients().stream() + return CompletableFuture.completedFuture(request.getIngredients().stream().parallel() .map(ingredient -> toTestIngredientDto(ingredient, recipe)) .collect(Collectors.toList())); }