diff --git a/src/main/java/com/example/fiurinee/domain/inputMessage/controller/ModelController.java b/src/main/java/com/example/fiurinee/domain/inputMessage/controller/ModelController.java index 522307b..841003d 100644 --- a/src/main/java/com/example/fiurinee/domain/inputMessage/controller/ModelController.java +++ b/src/main/java/com/example/fiurinee/domain/inputMessage/controller/ModelController.java @@ -68,7 +68,9 @@ public ResponseEntity> inputMent(@PathVariable("id") Long } @PostMapping("/ment") - public ResponseEntity> inputMentNotMember(@RequestBody String ment){ + public ResponseEntity> inputMentNotMember(@RequestBody RequestMentDto mentDto){ + + String ment = mentDto.ment(); String url = "http://3.106.186.161/api/recommend"; int value = LocalDateTime.now().getMonth().getValue(); @@ -97,7 +99,9 @@ public ResponseEntity> inputMentNotMember(@RequestBody Str @PostMapping("/{memberId}/{flowerId}") public ResponseEntity selectFlower(@PathVariable ("memberId") Long memberId, @PathVariable ("flowerId") Long flowerId, - @RequestBody String ment){ + @RequestBody RequestMentDto mentDto){ + + String ment = mentDto.ment(); inputMessageService.saveInputMessage(memberId,ment); @@ -143,7 +147,9 @@ public ResponseEntity selectFlower(@PathVariable ("m @PostMapping("/{flowerId}/non") public ResponseEntity selectFlowerNonMember(@PathVariable ("flowerId") Long flowerId, - @RequestBody String ment){ + @RequestBody RequestMentDto mentDto){ + String ment = mentDto.ment(); + String url = "http://3.106.186.161/api/flower_color"; Flower flower = flowerService.findById(flowerId); diff --git a/src/main/java/com/example/fiurinee/domain/inputMessage/controller/api/ModelApi.java b/src/main/java/com/example/fiurinee/domain/inputMessage/controller/api/ModelApi.java index 5e6ba7f..d5ddc7e 100644 --- a/src/main/java/com/example/fiurinee/domain/inputMessage/controller/api/ModelApi.java +++ b/src/main/java/com/example/fiurinee/domain/inputMessage/controller/api/ModelApi.java @@ -45,7 +45,7 @@ public ResponseEntity> inputMent(@Parameter(description = ) @ApiResponse(responseCode = "200", description = "꽃 추천 성공") @PostMapping("/ment") - public ResponseEntity> inputMentNotMember(@Parameter(description = "입력한 멘트") @RequestBody String ment); + public ResponseEntity> inputMentNotMember(@Parameter(description = "입력한 멘트") @RequestBody RequestMentDto mentDto); @Operation( summary = "사용자가 꽃을 선택했을 시 호출", @@ -63,7 +63,7 @@ public ResponseEntity> inputMent(@Parameter(description = @PostMapping("/{memberId}/{flowerId}") public ResponseEntity selectFlower(@Parameter(description = "회원의 아이디") @PathVariable ("memberId") Long memberId, @Parameter(description = "선택한 꽃의 아이디") @PathVariable ("flowerId") Long flowerId, - @Parameter(description = "입력했던 멘트") @RequestBody String ment); + @Parameter(description = "입력했던 멘트") @RequestBody RequestMentDto mentDto); @Operation( summary = "비회원 사용자가 꽃을 선택했을 시 호출", description = "꽃을 선택했을 시 선택한 꽃의 id 그리고 이전에 입력했던 사용자의 멘트를 보내주세요", @@ -72,6 +72,6 @@ public ResponseEntity selectFlower(@Parameter(descri @ApiResponse(responseCode = "200", description = "멘트 추천 및 어울리는 꽃 추천 성공") @PostMapping("/{flowerId}/non") public ResponseEntity selectFlowerNonMember(@Parameter(description = "꽃의 아이디") @PathVariable ("flowerId") Long flowerId, - @Parameter(description = "회원이 입력 했던 멘트") @RequestBody String ment); + @Parameter(description = "회원이 입력 했던 멘트") @RequestBody RequestMentDto mentDto); }