Parcourir la source

更新规则链管理接口

liuxiulin il y a 2 ans
Parent
commit
aa81127610

+ 1 - 1
services/knowoapi/controllers/rule_chain.go

@@ -6,7 +6,7 @@ import (
 	"sparrow/services/knowoapi/services"
 )
 
-// RuleChainController ruleChain
+// RuleChainController api
 type RuleChainController struct {
 	Ctx     iris.Context
 	Service services.RuleChainService

+ 1 - 1
services/knowoapi/router.go

@@ -98,6 +98,6 @@ func registerRouters(srv *iris.Application, models *model.All, gen *generator.Ke
 	RoleAPI.Register(roleService).Handle(new(controllers.RoleController))
 
 	// ruleChain api
-	RuleChainAPI := mvc.New(v1router.Party("/chain"))
+	RuleChainAPI := mvc.New(adminRouter.Party("/rule_chain"))
 	RuleChainAPI.Register(ruleChainService).Handle(new(controllers.RuleChainController))
 }

+ 1 - 1
services/knowoapi/services/rule_chain.go

@@ -22,7 +22,7 @@ type ruleChainService struct {
 	model *model.All
 }
 
-// NewRuleChainService  create a alert back a  AlertService interface
+// NewRuleChainService  new ruleChain service
 func NewRuleChainService(model *model.All) RuleChainService {
 	return ruleChainService{
 		model: model,