fix(web): change http body key name

This commit is contained in:
zhaoying
2026-04-14 15:08:07 +08:00
parent 2d9986f902
commit b5ec5c2cea
2 changed files with 5 additions and 5 deletions

View File

@@ -85,9 +85,9 @@ const EditableTable: FC<EditableTableProps> = ({
return [
{
title: t('workflow.config.name'),
dataIndex: 'name',
dataIndex: 'key',
render: (_: any, __: TableRow, index: number) => (
<Form.Item name={[index, 'name']} className={formClassName}>
<Form.Item name={[index, 'key']} className={formClassName}>
<Editor
options={namefilterOptions}
type="input"

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 15:17:48
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-13 15:33:58
* @Last Modified time: 2026-04-14 15:05:33
*/
import { Clipboard, Graph, Keyboard, MiniMap, Node, Snapline, type Edge } from '@antv/x6';
import { register } from '@antv/x6-react-shape';
@@ -204,7 +204,7 @@ export const useWorkflowGraph = ({
? Object.entries(group_variables as Record<string, any>).map(([key, value]) => ({ key, value }))
: group_variables
} else if (type === 'http-request' && (key === 'headers' || key === 'params') && config[key] && typeof config[key] === 'object' && !Array.isArray(config[key]) && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
nodeLibraryConfig.config[key].defaultValue = Object.entries(config[key]).map(([name, value]) => ({ name, value }))
nodeLibraryConfig.config[key].defaultValue = Object.entries(config[key]).map(([key, value]) => ({ key, value }))
} else if (type === 'code' && key === 'code' && config[key] && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
try {
nodeLibraryConfig.config[key].defaultValue = decodeURIComponent(atob(config[key] as string))
@@ -1259,7 +1259,7 @@ export const useWorkflowGraph = ({
itemConfig[key] = {}
if (value.length > 0) {
value.forEach((vo: any) => {
itemConfig[key][vo.name] = vo.value
itemConfig[key][vo.key] = vo.value
})
}
} else if (data.config[key] && 'defaultValue' in data.config[key] && key !== 'knowledge_retrieval') {