mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-20 16:20:27 +08:00
优化代码
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/models"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
@@ -32,7 +32,7 @@ func (this *UpdateSetPopupAction) RunGet(params struct {
|
||||
this.Data["groupId"] = params.GroupId
|
||||
this.Data["type"] = params.Type
|
||||
|
||||
firewallPolicy, err := models.SharedHTTPFirewallPolicyDAO.FindEnabledPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
|
||||
firewallPolicy, err := dao.SharedHTTPFirewallPolicyDAO.FindEnabledHTTPFirewallPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
@@ -68,7 +68,7 @@ func (this *UpdateSetPopupAction) RunGet(params struct {
|
||||
this.Data["actions"] = actionMaps
|
||||
|
||||
// 规则集信息
|
||||
setConfig, err := models.SharedHTTPFirewallRuleSetDAO.FindRuleSetConfig(this.AdminContext(), params.SetId)
|
||||
setConfig, err := dao.SharedHTTPFirewallRuleSetDAO.FindRuleSetConfig(this.AdminContext(), params.SetId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
@@ -94,7 +94,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct {
|
||||
Must *actions.Must
|
||||
}) {
|
||||
// 规则集信息
|
||||
setConfig, err := models.SharedHTTPFirewallRuleSetDAO.FindRuleSetConfig(this.AdminContext(), params.SetId)
|
||||
setConfig, err := dao.SharedHTTPFirewallRuleSetDAO.FindRuleSetConfig(this.AdminContext(), params.SetId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user