mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-05-04 14:25:19 +08:00
路由规则找不到的时候提示用户
This commit is contained in:
@@ -28,7 +28,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
}
|
||||
this.Data["webId"] = webConfig.Id
|
||||
|
||||
locationMaps := []maps.Map{}
|
||||
var locationMaps = []maps.Map{}
|
||||
if webConfig.Locations != nil {
|
||||
for _, location := range webConfig.Locations {
|
||||
err := location.ExtractPattern()
|
||||
@@ -46,7 +46,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
pieces := strings.Split(location.Pattern, " ")
|
||||
var pieces = strings.Split(location.Pattern, " ")
|
||||
if len(pieces) == 2 {
|
||||
m["pattern"] = pieces[1]
|
||||
m["patternTypeName"] = serverconfigs.FindLocationPatternTypeName(location.PatternType())
|
||||
|
||||
Reference in New Issue
Block a user