Skip to content

Commit

Permalink
Fix: 백엔드 로그인 로직에 맞춰 URL 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
soulchicken committed Nov 1, 2023
1 parent 61c0f0b commit d0a881c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/utils/api/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -59,6 +59,7 @@ export const credentialsSignupAPI = async ({
};

const result = await ssrInstance.post('members/signup', sendSignupData);

return result.data;
};

Expand Down
4 changes: 2 additions & 2 deletions src/utils/api/character.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const findCharacterById = async (characterId: string) => {
};

export const ssrFindAllCharacters = async () => {
const result = await ssrInstance.get<CharacterInfo[]>('/characters');
const result = await ssrInstance.get<CharacterInfo[]>('/api/characters');
return result.data;
};

export const ssrFindCharacterById = async (characterId: string) => {
const result = await ssrInstance.get<CharacterInfo>(`/characters/${characterId}`);
const result = await ssrInstance.get<CharacterInfo>(`/api/characters/${characterId}`);
return result.data;
};
2 changes: 1 addition & 1 deletion src/utils/axiosInstance/ssrInstance.ts
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down

0 comments on commit d0a881c

Please sign in to comment.