From bcbc36c0c42787319a0c486912f2a0efd2ab1d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=8C=EC=9A=B8=EC=B9=98=ED=82=A8?= <90738604+soulchicken@users.noreply.github.com> Date: Wed, 1 Nov 2023 19:23:58 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EB=B0=B1=EC=97=94=EB=93=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EB=A1=9C=EC=A7=81=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EC=B6=B0=20URL=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api/accounts.ts | 3 ++- src/utils/api/character.ts | 4 ++-- src/utils/axiosInstance/ssrInstance.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/api/accounts.ts b/src/utils/api/accounts.ts index 9a876af..42725b8 100644 --- a/src/utils/api/accounts.ts +++ b/src/utils/api/accounts.ts @@ -30,7 +30,7 @@ export const credentialsLoginAPI = async (credentials : Credentials) => { }; export const socialLoginAPI = async (socialLoginForm : SocialLoginForm) => { - const result = await defaultInstance.post('members/social-login', JSON.stringify(socialLoginForm)); + const result = await defaultInstance.post('members/social-login', socialLoginForm); return result.data; }; @@ -59,6 +59,7 @@ export const credentialsSignupAPI = async ({ }; const result = await ssrInstance.post('members/signup', sendSignupData); + return result.data; }; diff --git a/src/utils/api/character.ts b/src/utils/api/character.ts index 839d1e8..b8ac9c2 100644 --- a/src/utils/api/character.ts +++ b/src/utils/api/character.ts @@ -13,11 +13,11 @@ export const findCharacterById = async (characterId: string) => { }; export const ssrFindAllCharacters = async () => { - const result = await ssrInstance.get('/characters'); + const result = await ssrInstance.get('/api/characters'); return result.data; }; export const ssrFindCharacterById = async (characterId: string) => { - const result = await ssrInstance.get(`/characters/${characterId}`); + const result = await ssrInstance.get(`/api/characters/${characterId}`); return result.data; }; diff --git a/src/utils/axiosInstance/ssrInstance.ts b/src/utils/axiosInstance/ssrInstance.ts index 9f8c18b..567b62c 100644 --- a/src/utils/axiosInstance/ssrInstance.ts +++ b/src/utils/axiosInstance/ssrInstance.ts @@ -1,7 +1,7 @@ import axios, { AxiosError } from 'axios'; const ssrInstance = axios.create({ - baseURL: `${process.env.NEXT_PUBLIC_SERVER_URL || 'http://localhost:8080/'}api/`, + baseURL: `${process.env.NEXT_PUBLIC_SERVER_URL || 'http://localhost:8080/'}`, }); ssrInstance.interceptors.response.use((response) => response, (error: AxiosError) => {