-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
어떤 버그인가요?
친구 요청이 왔을 때, 친구신청 수락 API를 호출 했을 때 일어나는 에러입니다.
어떤 상황에서 발생한 버그인가요?
오늘 친구신청 수락기능을 구현을 하고 있었고, 친구신청 수락 요청을 아래와 같이 axios/patch를 사용해서 요청했습니다.
export const acceptFriendRequest = async (
userId: string,
friendId: string,
token: string | null
) => {
const url = `${process.env.REACT_APP_BASE_URL}/user/api/v1/user/${userId}/friend/${friendId}`;
try {
const response = await axios({
method: "patch",
url,
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(response.data);
return response.data;
} catch (error) {
console.error(error);
}
};예상 결과
친구의 userId가 결과값으로 나와야합니다. 이 userId결과값을 사용해서 친구목록 추가에 사용할 예정입니다.
참고할만한 자료(선택)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status
