fix(desktop): use RENDERER_VITE_API_URL for renderer API host

Read API host from import.meta.env.RENDERER_VITE_API_URL instead of
hardcoding it, so staging/dev builds point to the correct backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yushen 2026-02-14 07:30:48 +08:00
parent b7477cb646
commit ef32078b3c
2 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import { useAuthStore } from '../stores/auth'
// Backend API host — change this when switching environments
const API_HOST = 'https://api.multica.ai'
// Backend API host — driven by RENDERER_VITE_API_URL env var (set in .env.production / .env.development)
const API_HOST = import.meta.env.RENDERER_VITE_API_URL || 'https://api.multica.ai'
/**
* Fetch request wrapper for desktop app.

View file

@ -1 +1,5 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly RENDERER_VITE_API_URL?: string
}