Skip to content

Commit

Permalink
change check array type addMutil
Browse files Browse the repository at this point in the history
  • Loading branch information
snowlyg committed Feb 1, 2023
1 parent 90fcdd1 commit e79f69d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/web/web_gin/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func (ws *WebServer) GetEngine() *gin.Engine {
func (ws *WebServer) AddWebStatic(staticAbsPath, webPrefix string, paths ...string) {
webPrefixs := strings.Split(web.CONFIG.System.WebPrefix, ",")
wp := arr.NewCheckArrayType(2)
wp.AddMutil(webPrefixs[0], webPrefixs[1])
for _, webPrefix := range webPrefixs {
wp.Add(webPrefix)
}
if wp.Check(webPrefix) {
return
}
Expand Down
4 changes: 3 additions & 1 deletion server/web/web_iris/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ func (ws *WebServer) AddModule(parties ...Party) {
func (ws *WebServer) AddWebStatic(staticAbsPath, webPrefix string, paths ...string) {
webPrefixs := strings.Split(web.CONFIG.System.WebPrefix, ",")
wp := arr.NewCheckArrayType(2)
wp.AddMutil(webPrefixs[0], webPrefixs[1])
for _, webPrefix := range webPrefixs {
wp.Add(webPrefix)
}
if wp.Check(webPrefix) {
return
}
Expand Down

0 comments on commit e79f69d

Please sign in to comment.