mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
🚀 dashboard v0.14.4 hide the server from guests
This commit is contained in:
@@ -306,6 +306,7 @@ type serverForm struct {
|
||||
Secret string
|
||||
Tag string
|
||||
Note string
|
||||
HideForGuest string
|
||||
}
|
||||
|
||||
func (ma *memberAPI) addOrEditServer(c *gin.Context) {
|
||||
@@ -321,6 +322,7 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) {
|
||||
s.ID = sf.ID
|
||||
s.Tag = sf.Tag
|
||||
s.Note = sf.Note
|
||||
s.HideForGuest = sf.HideForGuest == "on"
|
||||
if s.ID == 0 {
|
||||
s.Secret = utils.MD5(fmt.Sprintf("%s%s%d", time.Now(), sf.Name, admin.ID))
|
||||
s.Secret = s.Secret[:18]
|
||||
|
||||
Reference in New Issue
Block a user