mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-21 00:46:35 +08:00
优化代码
This commit is contained in:
@@ -3,7 +3,7 @@ package locations
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/webutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
@@ -25,7 +25,7 @@ func (this *CreateAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
ParentId int64 // 父节点
|
||||
}) {
|
||||
webConfig, err := webutils.FindWebConfigWithServerId(this.Parent(), params.ServerId)
|
||||
webConfig, err := dao.SharedHTTPWebDAO.FindWebConfigWithServerId(this.AdminContext(), params.ServerId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
@@ -88,7 +88,7 @@ func (this *CreateAction) RunPost(params struct {
|
||||
locationId := locationResp.LocationId
|
||||
|
||||
// Web中Location
|
||||
webConfig, err := webutils.FindWebConfigWithId(this.Parent(), params.WebId)
|
||||
webConfig, err := dao.SharedHTTPWebDAO.FindWebConfigWithId(this.AdminContext(), params.WebId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user