🎨一些修改
This commit is contained in:
parent
e172b3c838
commit
5fc8cc8d94
@ -109,7 +109,11 @@ func (r clientRepo) Save(p param.SaveClient, adminId string) (client *entity.Cli
|
||||
if p.Id != "" {
|
||||
keys, _ := json.Marshal(p.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
|
||||
|
@ -109,7 +109,7 @@ func (s Script) InitServer() error {
|
||||
"dnsServer": []string{"10.10.10.1/24"},
|
||||
"MTU": 1450,
|
||||
"persistentKeepalive": 15,
|
||||
"firewallMark": "",
|
||||
"firewallMark": "0xca6c",
|
||||
"table": "",
|
||||
"configFilePath": "/etc/wireguard/wg0.conf",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user