mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-03-23 11:31:51 +00:00
remove id field in every form struct, fix cron & ddns db (#11)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -50,8 +48,5 @@ func (d *DDNSProfile) BeforeSave(tx *gorm.DB) error {
|
||||
}
|
||||
|
||||
func (d *DDNSProfile) AfterFind(tx *gorm.DB) error {
|
||||
if d.DomainsRaw != "" {
|
||||
d.Domains = strings.Split(d.DomainsRaw, ",")
|
||||
}
|
||||
return nil
|
||||
return utils.Json.Unmarshal([]byte(d.DomainsRaw), &d.Domains)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user