mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-07 06:00:06 +00:00
🐛 修复展示对游客隐藏服务器
This commit is contained in:
@@ -217,13 +217,16 @@ func (cp *commonPage) getServerStat(c *gin.Context, withPublicNote bool) ([]byte
|
|||||||
singleton.SortedServerLock.RLock()
|
singleton.SortedServerLock.RLock()
|
||||||
defer singleton.SortedServerLock.RUnlock()
|
defer singleton.SortedServerLock.RUnlock()
|
||||||
|
|
||||||
var servers []*model.Server
|
var serverList []*model.Server
|
||||||
|
if authorized {
|
||||||
for _, server := range singleton.SortedServerListForGuest {
|
serverList = singleton.SortedServerList
|
||||||
item := *server
|
} else {
|
||||||
if item.HideForGuest && !authorized {
|
serverList = singleton.SortedServerListForGuest
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var servers []*model.Server
|
||||||
|
for _, server := range serverList {
|
||||||
|
item := *server
|
||||||
if !withPublicNote {
|
if !withPublicNote {
|
||||||
item.PublicNote = ""
|
item.PublicNote = ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user