diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index cda76e5..454073c 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -268,7 +268,8 @@ export interface SkinPhotoAnalysisResponse { export async function analyzeSkinPhotos(files: File[]): Promise { const body = new FormData(); for (const file of files) body.append('photos', file); - const res = await fetch(`${PUBLIC_API_BASE}/skincare/analyze-photos`, { method: 'POST', body }); + const base = browser ? '/api' : PUBLIC_API_BASE; + const res = await fetch(`${base}/skincare/analyze-photos`, { method: 'POST', body }); if (!res.ok) { const detail = await res.json().catch(() => ({ detail: res.statusText })); throw new Error(detail?.detail ?? res.statusText);