From d811f4e724fa080d9e1d6d85baaf429650156749 Mon Sep 17 00:00:00 2001 From: kim jihwan Date: Thu, 15 Aug 2024 16:00:17 +0900 Subject: [PATCH] =?UTF-8?q?api:=20github.io=20proxy=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EB=A1=9C=20back=EC=97=90=20?= =?UTF-8?q?=EB=B0=94=EB=A1=9C=20=EC=A0=84=EB=8B=AC=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/LoginApi.ts | 2 +- src/pages/LoginPage/LoginPage.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apis/LoginApi.ts b/src/apis/LoginApi.ts index 9f83b7f..94ff011 100644 --- a/src/apis/LoginApi.ts +++ b/src/apis/LoginApi.ts @@ -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); }; diff --git a/src/pages/LoginPage/LoginPage.tsx b/src/pages/LoginPage/LoginPage.tsx index 30d890d..ce4619c 100644 --- a/src/pages/LoginPage/LoginPage.tsx +++ b/src/pages/LoginPage/LoginPage.tsx @@ -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 (