Skip to content

Commit

Permalink
api: github.io proxy 안되는 문제로 back에 바로 전달하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Turtle-Hwan committed Aug 15, 2024
1 parent 57ba4a5 commit d811f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apis/LoginApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export const loginApi = async (email: string, password: string) => {
};
const requestOptions = createRequestOptionsJSON("POST", JSON.stringify(body));

return await fetchLoginApi("/api/user/login", requestOptions);
return await fetchLoginApi(`${import.meta.env.VITE_API_BACK_URL}/user/login`, requestOptions);
};
4 changes: 3 additions & 1 deletion src/pages/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const LoginPage = () => {
}, [id, password]);

const handleLogin = () => {
loginApi(id, password).then(res => res.status === "OK" ? navigate("/") : alert("login error: " + res.message));
loginApi(id, password).then((res) =>
res.status === "OK" ? navigate("/") : alert("login error: " + res.message),
);
};

return (
Expand Down

0 comments on commit d811f4e

Please sign in to comment.