Skip to content

Commit

Permalink
MOVE function lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
karminski committed Jan 12, 2024
1 parent 2ba557d commit 1fe03b2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/model/flow_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 1fe03b2

Please sign in to comment.