fix: Configure admin service URLs dynamically based on environment
- Update adminService to fetch server URL from /api/config endpoint - Initialize server URL before making any API calls - Make connect() method async to handle URL initialization - Update Vue component to await adminService.connect() - Resolves hardcoded localhost URLs in production environment
This commit is contained in:
@@ -129,7 +129,7 @@ onMounted(async () => {
|
||||
serverUrl.value = config.serverUrl
|
||||
|
||||
// Connect to SSE
|
||||
adminService.connect((data) => {
|
||||
await adminService.connect((data) => {
|
||||
if (data.type === 'connected') {
|
||||
isConnected.value = true
|
||||
} else if (data.type === 'gameStats') {
|
||||
|
||||
Reference in New Issue
Block a user