Skip to content

Commit

Permalink
Merge pull request #131 from studio-recoding/feat-chat-delete
Browse files Browse the repository at this point in the history
[🧹chore] 추가된 일정이 무엇인지 확인하도록 변경
  • Loading branch information
JeonHaeseung authored Jul 6, 2024
2 parents 2e266ed + 7522748 commit d22f906
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ public GetChatListDto postAiScheduleAccept(Long memberId, Boolean idAccepted, Lo

scheduleRepository.save(newSchedule);

chatService.createNewChat("일정을 추가해드렸습니다:)", ChatType.AI, 1, member);
chatService.createNewChat("\"" + postScheduleDto.getInfo() + "\" " + "일정을 추가해드렸습니다:)", ChatType.AI, 1, member);
}
else{
throw new NotFoundCategoryException();
}
} else {
chatService.createNewChat("일정 추가를 취소했습니다.\n더 필요한 것이 있으시면 알려주세요!", ChatType.AI, 1, member);
chatService.createNewChat("\"" + postScheduleDto.getInfo() + "\" " + "일정 추가를 취소했습니다.\n더 필요한 것이 있으시면 알려주세요!", ChatType.AI, 1, member);
}

// 모든 채팅 내역 반환
Expand Down Expand Up @@ -193,10 +193,12 @@ public GetChatListDto deleteAiScheduleAccept(Long memberId, Boolean idAccepted,
log.error("Failed to delete data in Vector DB");
}

String info = schedule.getInfo();

//RDB에서 삭제
scheduleRepository.delete(schedule);

chatService.createNewChat("일정을 삭제해드렸습니다!", ChatType.AI, 1, member);
chatService.createNewChat("\"" + info + "\" " + "일정을 삭제해드렸습니다!", ChatType.AI, 1, member);
}
else{
throw new NotFoundScheduleException();
Expand Down

0 comments on commit d22f906

Please sign in to comment.