🎨一些修改

This commit is contained in:
coward 2024-05-24 16:08:00 +08:00
parent e172b3c838
commit 5fc8cc8d94
2 changed files with 6 additions and 2 deletions

View File

@ -109,7 +109,11 @@ func (r clientRepo) Save(p param.SaveClient, adminId string) (client *entity.Cli
if p.Id != "" { if p.Id != "" {
keys, _ := json.Marshal(p.Keys) keys, _ := json.Marshal(p.Keys)
ent.Keys = string(keys) ent.Keys = string(keys)
if err = r.Model(&entity.Client{}).Where("id = ?", p.Id).Updates(ent).Error; err != nil { if err = r.Model(&entity.Client{}).
Where("id = ?", p.Id).Select("name", "email", "subnet_range", "ip_allocation",
"allowed_ips", "extra_allowed_ips", "endpoint", "use_server_dns", "enable_after_creation",
"user_id", "enabled").
Updates(ent).Error; err != nil {
return return
} }
return return

View File

@ -109,7 +109,7 @@ func (s Script) InitServer() error {
"dnsServer": []string{"10.10.10.1/24"}, "dnsServer": []string{"10.10.10.1/24"},
"MTU": 1450, "MTU": 1450,
"persistentKeepalive": 15, "persistentKeepalive": 15,
"firewallMark": "", "firewallMark": "0xca6c",
"table": "", "table": "",
"configFilePath": "/etc/wireguard/wg0.conf", "configFilePath": "/etc/wireguard/wg0.conf",
} }