Skip to content

Commit

Permalink
Fix: 채팅 API 관련 일부 수정 (#26)
Browse files Browse the repository at this point in the history
- 메시지 전송 API 호출 로직 수정
- 메시지 수신 시 데이터 파싱 오류 해결
- 채팅방 생성 API 응답 구조 변경 반영
  • Loading branch information
sunglitter committed Dec 1, 2024
1 parent 8e0ca1d commit fd7218c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/pages/community/api/chatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ import {
export const fetchChatRoomDetails = async (
chatRoomId: string
): Promise<{
chatRoomId: string;
participants: { userId: string; nickname: string }[];
authorNickname: string;
chatRoomTitle: string;
}> => {
try {
// 실제 API 사용
// const response = await axiosInstance.get(`/chat/${chatRoomId}`);
// return response.data;
// return {
// chatRoomId,
// participants: response.data.participants,
// authorNickname: response.data.authorNickname,
// chatRoomTitle: response.data.chatRoomTitle,
// };

// Mock 데이터 기반:
return mockFetchChatRoomDetails(chatRoomId);
Expand Down

0 comments on commit fd7218c

Please sign in to comment.