Skip to content

Commit

Permalink
Fix: 레시피 생성 이미지 관련 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongho427 committed May 30, 2024
1 parent 4b95293 commit d642001
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ResponseEntity<SuccessResponse<ImageResponse>> getImage(@RequestParam Str
@Operation(summary = "레시피 생성 api", description = """
레시피 상세 조회 api입니다.
gpt 결과를 보내주시면 레시피를 생성하고 저장합니다.
레시피 이미지와 gpt 결과를 보내주시면 레시피를 생성하고 저장합니다.
저장한 레시피와 레시피 관련 영상을 반환해줍니다.
""")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class CreateRecipeRequest {

private String recipeName;

private String recipeImg;

private String introduce;

private List<String> ingredients;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ public RecipeDetailsResponse getRecipeDetails(Long recipeId) {
//레시피 생성
@Transactional
public RecipeDetailsResponse createRecipe(CreateRecipeRequest request) throws IOException {
String recipeImg = naverSearchImageService.getImageFromNaverSearchApi(request.getQuery());
List<RecipeVideos> recipeVideos = youtubeService.searchVideo(request.getQuery());

Recipe recipe = Recipe.of(recipeImg, request.getRecipeName(), request.getIntroduce(),
Recipe recipe = Recipe.of(request.getRecipeImg(), request.getRecipeName(), request.getIntroduce(),
request.getIngredients(), request.getRecipeDetails(), recipeVideos);

recipeRepository.save(recipe);
Expand Down

0 comments on commit d642001

Please sign in to comment.