24 lines
518 B
Go
24 lines
518 B
Go
|
|
package flow
|
||
|
|
|
||
|
|
import (
|
||
|
|
flowService "ai-agent/workflow/service/flow"
|
||
|
|
|
||
|
|
"github.com/gogf/gf/v2/frame/g"
|
||
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
||
|
|
)
|
||
|
|
|
||
|
|
type flowCallBack struct{}
|
||
|
|
|
||
|
|
var FlowCallBack = new(flowCallBack)
|
||
|
|
|
||
|
|
func (c *flowCallBack) HttpNodeCallback(r *ghttp.Request) {
|
||
|
|
ctx := r.Context()
|
||
|
|
err := flowService.FlowExecutionService.HttpNodeCallback(ctx)
|
||
|
|
if err != nil {
|
||
|
|
r.Response.WriteJson(g.Map{"code": 500, "message": err.Error()})
|
||
|
|
return
|
||
|
|
}
|
||
|
|
r.Response.WriteJson(g.Map{"code": 0, "message": "success"})
|
||
|
|
return
|
||
|
|
}
|