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

[feat #108] 채팅 수락/거절 API #109

Merged
merged 23 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5781fd9
[feat] : 채팅 요청 시 크레딧 차감
hyun2371 Sep 14, 2024
375f50a
[feat] : 채팅방 수락 여부 필드 -> 상태 enum으로 변경
hyun2371 Sep 14, 2024
0dc44ea
[feat] : 채팅방 수락 응답 DTO 추가
hyun2371 Sep 16, 2024
6748dc4
[feat] : 채팅방 수락 관련 에러코드 추가
hyun2371 Sep 16, 2024
87f19b6
[feat] : 채팅방 엔티티 -> 응답 변환 매퍼 함수 추가
hyun2371 Sep 16, 2024
fae7738
[feat] : 채팅방 상태 변경 함수 추가
hyun2371 Sep 16, 2024
d28dc7b
[feat] : 채팅 보상 크레딧 상수로 추출
hyun2371 Sep 16, 2024
48d3836
[feat] : 채팅 수락 비즈니스 로직 작성
hyun2371 Sep 16, 2024
8962821
[test] : 채팅 수락 비즈니스 로직 테스트
hyun2371 Sep 16, 2024
1200c16
[feat] : 채팅 수락 컨트롤러 메서드 작성
hyun2371 Sep 16, 2024
19f6cad
[feat] : 답변자와 멤버 비교 시 아이디로 동일성 비교
hyun2371 Sep 16, 2024
4495385
[test] : 채팅방 수락 로직 통합테스트
hyun2371 Sep 16, 2024
19d3a75
[test] : 각 테스트 끝날 때마다 DB 초기화
hyun2371 Sep 16, 2024
9fd756f
[test] : 실제 저장되는 채팅방 아이디 할당
hyun2371 Sep 16, 2024
d7fccf1
[feat] : 채팅 상태 ENUM 필드명 변경
hyun2371 Sep 16, 2024
ea70e92
[style] : 채팅 오류 ENUM 필드명 변경
hyun2371 Sep 16, 2024
815757d
[feat] : 채팅 거절 시 상태변경 메서드 추가
hyun2371 Sep 16, 2024
45e97e8
[feat] : 채팅 거절 응답 dto 추가
hyun2371 Sep 16, 2024
7f2df72
[feat] : 채팅 거절 비즈니스 메서드 추가
hyun2371 Sep 16, 2024
f66c595
[feat] : 채팅 거절 controller 메서드 추가
hyun2371 Sep 16, 2024
46bf9d0
[test] : 채팅 거절 비즈니스 로직 테스트
hyun2371 Sep 16, 2024
2ef0f9f
[test] : 채팅 거절 로직 통합 테스트
hyun2371 Sep 16, 2024
ab69788
[style] : 코드 리포멧팅
hyun2371 Sep 16, 2024
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
Prev Previous commit
Next Next commit
[test] : 실제 저장되는 채팅방 아이디 할당
hyun2371 committed Sep 16, 2024
commit 9fd756fd749ff2fc5720ab2c597640e3d311bb2c
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ void acceptChatRoom() throws Exception {
ChatRoom chatRoom = chatRoomRepository.save(ChatRoomFixture.chatRoom(questionPost, inquirer, loginMember));
int previousAnswererCredit = chatRoom.getAnswerer().getCredit();

mockMvc.perform(patch("/api/chat-rooms/{chatRoomId}/accept", 1L)
mockMvc.perform(patch("/api/chat-rooms/{chatRoomId}/accept", chatRoom.getId())
.cookie(accessToken))
.andExpect(status().isOk())
.andExpect(jsonPath("$.chatStatus").value(ChatStatus.ACCEPTED.getLabel()))