[fix] Add missing await for response.json() calls in template workflows

This commit is contained in:
bymyself
2025-08-15 14:14:03 -07:00
parent afecff6c94
commit e19f0b2da9

View File

@@ -162,13 +162,13 @@ export function useTemplateWorkflows() {
if (sourceModule === 'default') {
// Default templates provided by frontend are served as static files
const response = await fetch(api.fileURL(`/templates/${id}.json`))
return response.json()
return await response.json()
} else {
// Custom node templates served via API
const response = await api.fetchApi(
`/workflow_templates/${sourceModule}/${id}.json`
)
return response.json()
return await response.json()
}
}