:art:做了一些bug修复和变动
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"gitee.ltd/lxh/logger/log"
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
"strings"
|
||||
"wireguard-dashboard/command"
|
||||
"wireguard-dashboard/http/param"
|
||||
"wireguard-dashboard/model/entity"
|
||||
@@ -45,7 +44,7 @@ func (server) SaveServer(c *gin.Context) {
|
||||
}
|
||||
publicKey := privateKey.PublicKey()
|
||||
serverInfo := &entity.Server{
|
||||
IpScope: strings.Join(p.IpScope, ","),
|
||||
IpScope: p.IpScope,
|
||||
ListenPort: p.ListenPort,
|
||||
PrivateKey: privateKey.String(),
|
||||
PublicKey: publicKey.String(),
|
||||
@@ -84,10 +83,6 @@ func (server) GetServer(c *gin.Context) {
|
||||
log.Errorf("获取服务端信息失败: %v", err.Error())
|
||||
}
|
||||
|
||||
if data.IpScopeStr != "" {
|
||||
data.IpScope = strings.Split(data.IpScopeStr, ",")
|
||||
}
|
||||
|
||||
utils.GinResponse(c).OKWithData(data)
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func (setting) SetServerGlobal(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
data, _ := json.Marshal(p.Data)
|
||||
data, _ := json.Marshal(p)
|
||||
|
||||
var ent entity.Setting
|
||||
ent.Code = "SERVER_SETTING"
|
||||
|
||||
Reference in New Issue
Block a user