Skip to content

Commit

Permalink
✨ Feat: 아이디/비밀번호 찾기 api 로직 구현 #90
Browse files Browse the repository at this point in the history
  • Loading branch information
gd06070 committed Dec 17, 2024
1 parent cd18165 commit 4964194
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/api/userApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,36 @@ export const logoutApi = async () => {
throw error;
}
};

// 아이디 찾기
export const findId = async (email, nickname) => {
try {
const response = await axiosInstance({
method: 'post',
url: '/member/find-user-id',
data: { email, nickname },
});
console.log('전체 응답:', response);
console.log('응답 데이터:', response.data);
return response.data;
} catch (e) {
console.error('아이디 찾기 실패!!', e);
throw e;
}
};

// 비밀번호 찾기
export const findPassword = async (email, userId, title) => {
try {
const response = await axiosInstance({
method: 'post',
url: '/member/find-password',
data: { email, userId, title },
});
console.log('응답 데이터:', response.data);
return response.data;
} catch (e) {
console.error('비밀번호 찾기 실패!!', e);
throw e;
}
};

0 comments on commit 4964194

Please sign in to comment.