Skip to content

Commit

Permalink
Merge pull request #158 from KW-MUJI/develop
Browse files Browse the repository at this point in the history
수정
  • Loading branch information
minggong222 authored Dec 2, 2024
2 parents cfbefb5 + cbcd24a commit cc6a2c7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/api/authApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ export const sendAuthRequest = async (email, flag) => {
flag: flag,
};

const response = await fetch(`${API_BASE_URL}/auth/mailSend`, {
method: "POST",
body: JSON.stringify(requestBody),
});
const response = await apiClient.post(`/auth/mailSend`, requestBody);

if (!response.ok) {
throw new Error("Network response was not ok");
}

return await response;
return response;
};

export const verifyPinRequest = async (email, pin) => {
Expand All @@ -39,10 +36,7 @@ export const verifyPinRequest = async (email, pin) => {
authNum: pin,
};

const response = await fetch(`${API_BASE_URL}/auth/authCheck`, {
method: "POST",
body: JSON.stringify(requestBody),
});
const response = await apiClient.post(`/auth/authCheck`, requestBody);

return await response.json();
};
Expand Down

0 comments on commit cc6a2c7

Please sign in to comment.