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) => {