mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
✨ feat: 后台服务器备注 close #72
This commit is contained in:
@@ -11,8 +11,9 @@ import (
|
||||
type Server struct {
|
||||
Common
|
||||
Name string
|
||||
Tag string
|
||||
Tag string // 分组名
|
||||
Secret string `json:"-"`
|
||||
Note string `json:"-"` // 管理员可见备注
|
||||
DisplayIndex int // 展示权重,越大越靠前
|
||||
|
||||
Host *Host `gorm:"-"`
|
||||
@@ -24,5 +25,5 @@ type Server struct {
|
||||
}
|
||||
|
||||
func (s Server) Marshal() template.JS {
|
||||
return template.JS(fmt.Sprintf(`{"ID":%d,"Name":"%s","Secret":"%s"}`, s.ID, s.Name, s.Secret))
|
||||
return template.JS(fmt.Sprintf(`{"ID":%d,"Name":"%s","Secret":"%s","DisplayIndex":%d,"Tag":"%s","Note":"%s"}`, s.ID, s.Name, s.Secret, s.DisplayIndex, s.Tag, s.Note))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user