feat: 后台服务器备注 close #72

This commit is contained in:
naiba
2021-01-20 19:24:59 +08:00
parent 29bc810a8f
commit ec17948fe4
12 changed files with 83 additions and 66 deletions

View File

@@ -108,6 +108,7 @@ type serverForm struct {
DisplayIndex int
Secret string
Tag string
Note string
}
func (ma *memberAPI) addOrEditServer(c *gin.Context) {
@@ -122,6 +123,7 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) {
s.DisplayIndex = sf.DisplayIndex
s.ID = sf.ID
s.Tag = sf.Tag
s.Note = sf.Note
if sf.ID == 0 {
s.Secret = utils.MD5(fmt.Sprintf("%s%s%d", time.Now(), sf.Name, admin.ID))
s.Secret = s.Secret[:10]