From 1fe03b2e8629bf0c0b63658ed3c16b36a5a1f990 Mon Sep 17 00:00:00 2001 From: karminski Date: Fri, 12 Jan 2024 22:26:33 +0800 Subject: [PATCH] MOVE function lines. --- src/model/flow_action.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/model/flow_action.go b/src/model/flow_action.go index 32140e40..6c193c33 100644 --- a/src/model/flow_action.go +++ b/src/model/flow_action.go @@ -195,6 +195,13 @@ func (action *FlowAction) UpdateAppConfig(actionConfig *FlowActionConfig, userID action.InitUpdatedAt() } +func (action *FlowAction) MergeRunFlowActionContextToRawTemplate(context map[string]interface{}) { + template := action.ExportTemplateInMap() + template[ACTION_RUNTIME_INFO_FIELD_CONTEXT] = context + templateJsonByte, _ := json.Marshal(template) + action.RawTemplate = string(templateJsonByte) +} + func (action *FlowAction) UpdateWithRunFlowActionRequest(req *request.RunFlowActionRequest, userID int) { action.MergeRunFlowActionContextToRawTemplate(req.ExportContext()) action.Template = req.ExportTemplateInString() @@ -271,13 +278,6 @@ func (action *FlowAction) AppendRuntimeInfoForVirtualResource(authorization stri action.Template = string(templateInByte) } -func (action *FlowAction) MergeRunFlowActionContextToRawTemplate(context map[string]interface{}) { - template := action.ExportTemplateInMap() - template[ACTION_RUNTIME_INFO_FIELD_CONTEXT] = context - templateJsonByte, _ := json.Marshal(template) - action.RawTemplate = string(templateJsonByte) -} - func (action *FlowAction) SetResourceIDByAiAgent(aiAgent *illaresourcemanagersdk.AIAgentForExport) { action.ResourceID = aiAgent.ExportIDInInt() }