Use Vite API base URL for web deploys

This commit is contained in:
dahyeon committed 2026-07-03 05:09:59 -07:00
1 parent f80834c6ab
commit ffcba26e64
5 files changed
+14 -2

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@ import type {
PlayerAnalysisDto,
SimilarPlayersDto,
} from '@persona-lenz/shared'
import { resolveApiUrl } from '../config'
export class ApiError extends Error {
readonly status: number
@@ -19,7 +20,7 @@ export class ApiError extends Error {
async function request<T>(path: string, init?: RequestInit): Promise<T> {
let response: Response
try {
response = await fetch(path, init)
response = await fetch(resolveApiUrl(path), init)
} catch {
throw new ApiError(0, '서버에 연결하지 못했어요. 네트워크를 확인하고 다시 시도해 주세요.')
}