Add files via upload

This commit is contained in:
公明
2026-07-14 15:16:41 +08:00
committed by GitHub
parent a1925f2e03
commit 10be4e32c7
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1319,7 +1319,7 @@ func setupRoutes(
protected.PUT("/roles/:name", roleHandler.UpdateRole) protected.PUT("/roles/:name", roleHandler.UpdateRole)
protected.DELETE("/roles/:name", roleHandler.DeleteRole) protected.DELETE("/roles/:name", roleHandler.DeleteRole)
// 图编排 / 工作流定义(图结构固定,业务字段保存在 graph_json 中) // 工作流定义(图结构固定,业务字段保存在 graph_json 中)
protected.GET("/workflows/runs/pending", workflowHandler.ListPendingRuns) protected.GET("/workflows/runs/pending", workflowHandler.ListPendingRuns)
protected.GET("/workflows/runs/:runId/replay", workflowHandler.ReplayRun) protected.GET("/workflows/runs/:runId/replay", workflowHandler.ReplayRun)
protected.GET("/workflows/runs/:runId", workflowHandler.GetRun) protected.GET("/workflows/runs/:runId", workflowHandler.GetRun)
+2 -2
View File
@@ -187,7 +187,7 @@ func (h *WorkflowHandler) save(c *gin.Context, pathID string) {
saved, _ := h.db.GetWorkflowDefinition(id) saved, _ := h.db.GetWorkflowDefinition(id)
workflowrunner.InvalidateCompiledCache(id) workflowrunner.InvalidateCompiledCache(id)
if h.audit != nil { if h.audit != nil {
h.audit.RecordOK(c, "workflow", "save", "保存图编排流程", "workflow", id, map[string]interface{}{"name": name}) h.audit.RecordOK(c, "workflow", "save", "保存工作流", "workflow", id, map[string]interface{}{"name": name})
} }
c.JSON(http.StatusOK, gin.H{"message": "工作流已保存", "workflow": saved}) c.JSON(http.StatusOK, gin.H{"message": "工作流已保存", "workflow": saved})
} }
@@ -204,7 +204,7 @@ func (h *WorkflowHandler) Delete(c *gin.Context) {
} }
workflowrunner.InvalidateCompiledCache(id) workflowrunner.InvalidateCompiledCache(id)
if h.audit != nil { if h.audit != nil {
h.audit.RecordOK(c, "workflow", "delete", "删除图编排流程", "workflow", id, nil) h.audit.RecordOK(c, "workflow", "delete", "删除工作流", "workflow", id, nil)
} }
c.JSON(http.StatusOK, gin.H{"message": "工作流已删除"}) c.JSON(http.StatusOK, gin.H{"message": "工作流已删除"})
} }