mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 02:34:10 +00:00
14 lines
401 B
TypeScript
14 lines
401 B
TypeScript
import type { NodeReplacementResponse } from '../types'
|
|
|
|
import { api } from '@/scripts/api'
|
|
|
|
export async function fetchNodeReplacements(): Promise<NodeReplacementResponse> {
|
|
const response = await api.fetchApi('/node_replacements')
|
|
if (!response.ok) {
|
|
throw new Error(
|
|
`Failed to fetch node replacements: ${response.status} ${response.statusText}`
|
|
)
|
|
}
|
|
return response.json()
|
|
}
|