mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 10:44:12 +00:00
fix: applied based on code review
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user