mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
[修复] 节点类型字段名不匹配:前端 type 改为 node_type 对齐后端 JSON tag
This commit is contained in:
@@ -211,7 +211,7 @@ function buildFormValues(node?: Partial<NodeItem> | null): NodeEditorValues {
|
||||
}
|
||||
|
||||
return {
|
||||
type: node.type ?? 'edge_node',
|
||||
type: node.node_type ?? 'edge_node',
|
||||
name: node.name ?? '',
|
||||
ip: node.ip ?? '',
|
||||
ip_manual_override: node.ip_manual_override ?? false,
|
||||
@@ -235,7 +235,7 @@ function buildFormValues(node?: Partial<NodeItem> | null): NodeEditorValues {
|
||||
|
||||
function toPayload(values: NodeEditorValues): NodeMutationPayload {
|
||||
const basePayload = {
|
||||
type: values.type,
|
||||
node_type: values.type,
|
||||
name: values.name.trim(),
|
||||
ip: values.ip.trim(),
|
||||
ip_manual_override: values.ip_manual_override,
|
||||
|
||||
Reference in New Issue
Block a user