mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
[fix] Fix API URL prefix slash and add error handling
- Update comfyManagerService to use conditional API URL prefix based on manager v4 support - Fix manager UI state handling in command menubar and workflow warning dialog - Add proper manager state detection with fallback to settings panel - Remove unused imports and variables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import axios, { AxiosError, AxiosResponse } from 'axios'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { ServerFeatureFlag } from '@/composables/useFeatureFlags'
|
||||
import { api } from '@/scripts/api'
|
||||
import {
|
||||
type InstallPackParams,
|
||||
@@ -35,8 +36,12 @@ enum ManagerRoute {
|
||||
IS_LEGACY_MANAGER_UI = 'manager/is_legacy_manager_ui'
|
||||
}
|
||||
|
||||
// Create axios client with conditional v2 prefix based on manager v4 support
|
||||
const supportsV4 = api.getServerFeature(ServerFeatureFlag.MANAGER_SUPPORTS_V4)
|
||||
const baseURL = supportsV4 ? api.apiURL('/v2/') : api.apiURL('/')
|
||||
|
||||
const managerApiClient = axios.create({
|
||||
baseURL: api.apiURL('/v2/'),
|
||||
baseURL,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user