Skip to content

Commit

Permalink
Merge pull request #26 from studio-recoding/feat-main-api
Browse files Browse the repository at this point in the history
[🔧fix] post 요청에도 기존 모든 채팅 내역 반환하는 것으로 변경
  • Loading branch information
JeonHaeseung authored Mar 29, 2024
2 parents 62adfa5 + ba37f24 commit ecb12bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/Ness/Backend/domain/chat/ChatController.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,21 @@ public ResponseEntity<GetChatListDto> getUserChat(@AuthUser Member member){
return new ResponseEntity<>(oneUserChats, HttpStatusCode.valueOf(200));
}

/*
@PostMapping("")
@Operation(summary = "새로운 채팅으로 AI와 통신", description = "새로운 채팅 내역을 저장하고, AI의 응답을 받는 API 입니다.")
public ResponseEntity<GetAiChatDto> postAiChat(@AuthUser Member member, @RequestBody PostUserChatDto postUserChatDto){
GetAiChatDto answer = chatService.postNewUserChat(member.getId(), postUserChatDto);
return new ResponseEntity<>(answer, HttpStatusCode.valueOf(200));
}*/


// 03-29 수정 버전
@PostMapping("")
@Operation(summary = "새로운 채팅으로 AI와 통신", description = "새로운 채팅 내역을 저장하고, 새로운 내역을 포함해서 AI의 응답을 받는 API 입니다.")
public ResponseEntity<GetChatListDto> postAiChat(@AuthUser Member member, @RequestBody PostUserChatDto postUserChatDto) {
GetAiChatDto answer = chatService.postNewUserChat(member.getId(), postUserChatDto);
GetChatListDto oneUserChats = chatService.getOneWeekUserChat(member.getId());
return new ResponseEntity<>(oneUserChats, HttpStatusCode.valueOf(200));
}
}

0 comments on commit ecb12bd

Please sign in to comment.