Skip to content

Commit 61039e2

Browse files
1g2g1eecanimb96dlwl98
authored
refactor: 코딩 컨벤션 통일 (#89)
Co-authored-by: Chan Lee <[email protected]> Co-authored-by: Minjae Kim <[email protected]> Co-authored-by: 이진욱 <[email protected]>
1 parent fb64808 commit 61039e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+294
-278
lines changed

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<html lang="ko">
33
<head>
44
<meta charset="UTF-8" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1.0, maximum-scale=1"
8+
/>
59
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
610
<link
711
href="https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css"
@@ -11,7 +15,6 @@
1115
href="https://webfontworld.github.io/gmarket/GmarketSans.css"
1216
rel="stylesheet"
1317
/>
14-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1518
<title>픽플</title>
1619
</head>
1720
<body>

src/api/axiosInstance.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ import axios from 'axios';
22

33
import { setAuthorization } from './interceptors';
44

5-
const PROD = import.meta.env.MODE === 'production';
6-
7-
const baseURL = PROD
8-
? `${location.protocol}//${location.host}`
9-
: import.meta.env.VITE_BASE_URL;
10-
115
export const axiosInstance = axios.create({
12-
baseURL,
6+
baseURL: '/api',
137
headers: {
148
'Content-type': 'application/json',
159
},

src/api/games/deleteGameParticipate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export const deleteGameParticipate = async ({
66
gameId,
77
memberId,
88
}: DeleteGameParticipateRequest) => {
9-
await axiosInstance.delete(`/api/games/${gameId}/members/${memberId}`, {});
9+
await axiosInstance.delete(`/games/${gameId}/members/${memberId}`, {});
1010
};

src/api/games/getGameDetail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Game } from '@type/models';
55

66
export const getGameDetail = async ({ gameId }: { gameId: Game['id'] }) => {
77
const { data } = await axiosInstance.get<GetGameDetailResponse>(
8-
`api/games/${gameId}`,
8+
`/games/${gameId}`,
99
{}
1010
);
1111

src/api/games/getGameMembers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const getGameMembers = async ({
1313
status,
1414
}: getGameMembersProps) => {
1515
const { data } = await axiosInstance.get<GetGameMembersResponse>(
16-
`/api/games/${gameId}/members`,
16+
`/games/${gameId}/members`,
1717
{
1818
params: { status },
1919
}

src/api/games/getGames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const getGames = async ({
1313
page: number;
1414
size: number;
1515
}) => {
16-
const { data } = await axiosInstance.get<GetGamesResponse>('/api/games', {
16+
const { data } = await axiosInstance.get<GetGamesResponse>('/games', {
1717
params: { category, value, page, size },
1818
});
1919

src/api/games/patchGameParticipate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const patchMannerScoreReview = async ({
1212
gameId: Game['id'];
1313
memberId: Member['id'];
1414
}) => {
15-
await axiosInstance.patch(`api/games/${gameId}/members/${memberId}`, {
15+
await axiosInstance.patch(`/games/${gameId}/members/${memberId}`, {
1616
data: payload,
1717
});
1818
return;

src/api/games/patchMannerScoreReview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const patchMannerScoreReview = async ({
1010
payload: PatchGameMannerScoreReviewRequest;
1111
gameId: Game['id'];
1212
}) => {
13-
await axiosInstance.patch(`api/games/${gameId}/members/manner-scores`, {
13+
await axiosInstance.patch(`/games/${gameId}/members/manner-scores`, {
1414
data: payload,
1515
});
1616
return;

src/api/games/postGame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { axiosInstance } from '@api/axiosInstance';
33
import { PostGameRequest, PostGameResponse } from '@type/api/games';
44

55
export const postGame = async (payload: PostGameRequest) => {
6-
const { data } = await axiosInstance.post<PostGameResponse>('/api/games', {
6+
const { data } = await axiosInstance.post<PostGameResponse>('/games', {
77
data: payload,
88
});
99

src/api/games/postGameParticipate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const postGameParticipate = async ({
1010
payload: PostGameParticipateRequest;
1111
gameId: Game['id'];
1212
}) => {
13-
await axiosInstance.post(`/api/games/${gameId}/members`, {
13+
await axiosInstance.post(`/games/${gameId}/members`, {
1414
data: payload,
1515
});
1616
};

0 commit comments

Comments
 (0)