Refactor: 채팅 도메인 리팩토링 (#228) #232
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 개요
🔨 작업 내용
채팅 삭제 API 단일화: REST API와 WebSocket에 중복으로 존재하던 채팅 일괄 삭제 기능을 REST API(
DELETE /api/rooms/{roomId}/messages)로 단일화했습니다. WebSocket을 통한 삭제 로직은 제거하여 API의 역할을 명확히 했습니다.DTO 역할 분리: 기존의
RoomChatMessageDto를 요청용(RoomChatMessageRequest)과 응답용(RoomChatMessageResponse)으로 분리하여 각 DTO의 책임을 명확히 했습니다.불필요한 필드 제거: 프론트엔드 요구사항에 맞춰 채팅 기능에서 사용하지 않는
attachment및messageType관련 필드와 로직을 모두 제거하여 코드를 간소화했습니다.예외 처리 통일:
RoomChatService에서 SecurityException을 던지던 부분을 프로젝트 표준인 CustomException으로 변경하여 예외 처리의 일관성을 확보했습니다.🔗 관련 이슈
Closes #228
📝 참고 사항
RoomChatWebSocketControllerTest와RoomChatServiceTest테스트 코드를 모두 수정했습니다.✅ 체크리스트