Skip to content

Commit

Permalink
feat: location.origin 기반으로 API_URL의 dev/prod가 결정되도록 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Puterism committed Feb 15, 2024
1 parent 62a2c3e commit b1cc7ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/api/src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import BooltiHTTPError, { isBooltiHTTPError } from './BooltiHTTPError';
import { LOCAL_STORAGE } from './constants';

// TODO 환경 변수로 API 베이스 설정
const API_URL = 'https://dev.api.boolti.in';
const API_URL =
window.location.origin === 'https://boolti.in'
? 'https://api.boolti.in'
: 'https://dev.api.boolti.in';

interface PostRefreshTokenResponse {
accessToken: string;
Expand Down

0 comments on commit b1cc7ed

Please sign in to comment.