Skip to content

Commit

Permalink
Merge pull request #1908 from actiontech/issue-ee-1080
Browse files Browse the repository at this point in the history
everyone can read rule knowledge
  • Loading branch information
taolx0 authored Oct 13, 2023
2 parents f02da6f + dcc6c88 commit 704e4f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqle/api/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ func StartApi(net *gracenet.Net, exitChan chan struct{}, config config.SqleConfi
v1Router.DELETE("/custom_rules/:rule_id", v1.DeleteCustomRule, AdminUserAllowed())
v1Router.POST("/custom_rules", v1.CreateCustomRule, AdminUserAllowed())
v1Router.PATCH("/custom_rules/:rule_id", v1.UpdateCustomRule, AdminUserAllowed())
v1Router.GET("/rule_knowledge/db_types/:db_type/rules/:rule_name/", v1.GetRuleKnowledge, AdminUserAllowed())
v1Router.PATCH("/rule_knowledge/db_types/:db_type/rules/:rule_name/", v1.UpdateRuleKnowledgeV1, AdminUserAllowed())
v1Router.GET("/rule_knowledge/db_types/:db_type/custom_rules/:rule_name/", v1.GetCustomRuleKnowledge, AdminUserAllowed())
v1Router.PATCH("/rule_knowledge/db_types/:db_type/custom_rules/:rule_name/", v1.UpdateCustomRuleKnowledgeV1, AdminUserAllowed())

// configurations
Expand Down Expand Up @@ -310,6 +308,8 @@ func StartApi(net *gracenet.Net, exitChan chan struct{}, config config.SqleConfi
v1Router.GET("/projects/:project_name/rule_template_tips", v1.GetProjectRuleTemplateTips)
v1Router.POST("/rule_templates/parse", v1.ParseProjectRuleTemplateFile)
v1Router.GET("/projects/:project_name/rule_templates/:rule_template_name/export", v1.ExportProjectRuleTemplateFile)
v1Router.GET("/rule_knowledge/db_types/:db_type/rules/:rule_name/", v1.GetRuleKnowledge)
v1Router.GET("/rule_knowledge/db_types/:db_type/custom_rules/:rule_name/", v1.GetCustomRuleKnowledge)

//rule
v1Router.GET("/rules", v1.GetRules)
Expand Down

0 comments on commit 704e4f1

Please sign in to comment.