diff --git a/client/src/api/signUp.ts b/client/src/api/signUp.ts index 81780ee..2d6554c 100644 --- a/client/src/api/signUp.ts +++ b/client/src/api/signUp.ts @@ -1,12 +1,16 @@ import axios, {AxiosResponse} from 'axios'; +// 환경변수에서 API URL 가져오기 +const API_BASE_URL = process.env.REACT_APP_API_BASE_URL; + +// 회원가입 함수 export const signUp = ( name: string, password: string, email: string, ): Promise => { return axios - .post('http://34.64.179.51:8080/auth/admins/register', { + .post(`${API_BASE_URL}/auth/admins/register`, { name: name, password: password, email: email, @@ -15,7 +19,7 @@ export const signUp = ( return res; }) .catch(error => { - console.log('Failed to register admin:', error); + console.error('Failed to register admin:', error); return null; }); };