Skip to content

Commit

Permalink
refactor(api): API_URL에 기본값 문자열 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaymyong66 committed Oct 14, 2024
1 parent b873e04 commit 2ea5659
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MemberInfo } from '@/types';
import { apiClient } from './ApiClient';
import { customFetch } from './customFetch';

const API_URL = process.env.REACT_APP_API_URL;
const API_URL = process.env.REACT_APP_API_URL ?? '';

export const SIGNUP_API_URL = `${API_URL}${END_POINTS.SIGNUP}`;
export const LOGIN_API_URL = `${API_URL}${END_POINTS.LOGIN}`;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/api/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import type {
Category,
} from '@/types';
import { MemberInfo } from '@/types';

import { customFetch } from './customFetch';

const API_URL = process.env.REACT_APP_API_URL;
const API_URL = process.env.REACT_APP_API_URL ?? '';

export const CATEGORY_API_URL = `${API_URL}${END_POINTS.CATEGORIES}`;

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/like.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LikeDeleteRequest, LikePostRequest } from '@/types';

import { customFetch } from './customFetch';

const API_URL = process.env.REACT_APP_API_URL;
const API_URL = process.env.REACT_APP_API_URL ?? '';

export const LIKE_API_URL = `${API_URL}${END_POINTS.LIKES}`;

Expand Down
3 changes: 2 additions & 1 deletion frontend/src/api/tags.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { END_POINTS } from '@/routes';
import { MemberInfo } from '@/types';
import { TagListResponse } from '@/types/api';

import { customFetch } from './customFetch';

const API_URL = process.env.REACT_APP_API_URL;
const API_URL = process.env.REACT_APP_API_URL ?? '';

export const TAG_API_URL = `${API_URL}${END_POINTS.TAGS}`;

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SortingOption } from '@/types';
import { apiClient } from './ApiClient';
import { customFetch } from './customFetch';

const API_URL = process.env.REACT_APP_API_URL;
const API_URL = process.env.REACT_APP_API_URL ?? '';

export const TEMPLATE_API_URL = `${API_URL}${END_POINTS.TEMPLATES_EXPLORE}`;

Expand Down

0 comments on commit 2ea5659

Please sign in to comment.