mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-24 10:56:36 +08:00
实现路径规则部分功能
This commit is contained in:
@@ -2,6 +2,7 @@ package locations
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/webutils"
|
||||
)
|
||||
|
||||
type IndexAction struct {
|
||||
@@ -16,7 +17,18 @@ func (this *IndexAction) Init() {
|
||||
func (this *IndexAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
}) {
|
||||
// TODO
|
||||
webConfig, err := webutils.FindWebConfigWithServerId(this.Parent(), params.ServerId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Data["webId"] = webConfig.Id
|
||||
|
||||
if webConfig.Locations != nil {
|
||||
this.Data["locations"] = webConfig.Locations
|
||||
} else {
|
||||
this.Data["locations"] = []interface{}{}
|
||||
}
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user