mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
规则
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
"github.com/XM-GO/PandaKit/restfulx"
|
||||
"github.com/kakuilan/kgo"
|
||||
"pandax/apps/visual/entity"
|
||||
"pandax/apps/visual/services"
|
||||
"pandax/pkg/rule_engine"
|
||||
@@ -56,6 +57,7 @@ func (p *RuleChainApi) GetVisualRuleChain(rc *restfulx.ReqCtx) {
|
||||
func (p *RuleChainApi) InsertVisualRuleChain(rc *restfulx.ReqCtx) {
|
||||
var data entity.VisualRuleChain
|
||||
restfulx.BindQuery(rc, &data)
|
||||
data.RuleId = kgo.KStr.Uniqid("px")
|
||||
data.Creator = rc.LoginAccount.UserName
|
||||
p.VisualRuleChainApp.Insert(data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user