fix(web): update parseSchema api param

This commit is contained in:
zhaoying
2025-12-26 19:16:35 +08:00
parent e11c1bb233
commit 06e5f4f8ff

View File

@@ -99,16 +99,11 @@ const CustomToolModal = forwardRef<CustomToolModalRef, CustomToolModalProps>(({
};
const formatSchema = (value: string) => {
setParseSchemaData({} as ParseSchemaData)
try {
const json = JSON.parse(value)
parseSchema({ schema_content: json })
.then(res => {
const response = res as { data: ParseSchemaData }
setParseSchemaData(response.data)
})
} catch (error) {
console.log('error', error)
}
parseSchema({ schema_content: value })
.then(res => {
const response = res as { data: ParseSchemaData }
setParseSchemaData(response.data)
})
}
// 暴露给父组件的方法