Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 프론트로부터 받아오는 데이터에 dto 적용 #57

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public ResponseEntity<List<ResponseMentDto>> inputMent(@PathVariable("id") Long
}

@PostMapping("/ment")
public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@RequestBody String ment){
public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@RequestBody RequestMentDto mentDto){

String ment = mentDto.ment();
String url = "http://3.106.186.161/api/recommend";

int value = LocalDateTime.now().getMonth().getValue();
Expand Down Expand Up @@ -97,7 +99,9 @@ public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@RequestBody Str
@PostMapping("/{memberId}/{flowerId}")
public ResponseEntity<ResponseHarmonyWitnMentDto> selectFlower(@PathVariable ("memberId") Long memberId,
@PathVariable ("flowerId") Long flowerId,
@RequestBody String ment){
@RequestBody RequestMentDto mentDto){

String ment = mentDto.ment();

inputMessageService.saveInputMessage(memberId,ment);

Expand Down Expand Up @@ -143,7 +147,9 @@ public ResponseEntity<ResponseHarmonyWitnMentDto> selectFlower(@PathVariable ("m

@PostMapping("/{flowerId}/non")
public ResponseEntity<ResponseHarmonyWitnMentDto> 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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ResponseEntity<List<ResponseMentDto>> inputMent(@Parameter(description =
)
@ApiResponse(responseCode = "200", description = "꽃 추천 성공")
@PostMapping("/ment")
public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@Parameter(description = "입력한 멘트") @RequestBody String ment);
public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@Parameter(description = "입력한 멘트") @RequestBody RequestMentDto mentDto);

@Operation(
summary = "사용자가 꽃을 선택했을 시 호출",
Expand All @@ -63,7 +63,7 @@ public ResponseEntity<List<ResponseMentDto>> inputMent(@Parameter(description =
@PostMapping("/{memberId}/{flowerId}")
public ResponseEntity<ResponseHarmonyWitnMentDto> 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 그리고 이전에 입력했던 사용자의 멘트를 보내주세요",
Expand All @@ -72,6 +72,6 @@ public ResponseEntity<ResponseHarmonyWitnMentDto> selectFlower(@Parameter(descri
@ApiResponse(responseCode = "200", description = "멘트 추천 및 어울리는 꽃 추천 성공")
@PostMapping("/{flowerId}/non")
public ResponseEntity<ResponseHarmonyWitnMentDto> selectFlowerNonMember(@Parameter(description = "꽃의 아이디") @PathVariable ("flowerId") Long flowerId,
@Parameter(description = "회원이 입력 했던 멘트") @RequestBody String ment);
@Parameter(description = "회원이 입력 했던 멘트") @RequestBody RequestMentDto mentDto);
}

Loading