数据模型使用指针类型字段以避免空值自动更新的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"platform/pkg/u"
|
||||
"platform/web/auth"
|
||||
edge2 "platform/web/domains/edge"
|
||||
proxy2 "platform/web/domains/proxy"
|
||||
@@ -57,7 +58,7 @@ func OnlineEdge(c *fiber.Ctx) (err error) {
|
||||
Isp: int32(req.ISP),
|
||||
Prov: req.Prov,
|
||||
City: req.City,
|
||||
ProxyID: fwd.ID,
|
||||
ProxyID: &fwd.ID,
|
||||
Type: int32(edge2.TypeSelfHosted),
|
||||
Status: 1,
|
||||
}
|
||||
@@ -138,7 +139,7 @@ func AllEdgesAvailable(c *fiber.Ctx) (err error) {
|
||||
for i, info := range infos {
|
||||
edges[i] = AllEdgesAvailableRespItem{
|
||||
Ip: info.Host,
|
||||
Port: info.ProxyPort,
|
||||
Port: u.Z(info.ProxyPort),
|
||||
Isp: edge2.ISPToStr(edge2.ISP(info.Isp)),
|
||||
Prov: info.Prov,
|
||||
City: info.City,
|
||||
|
||||
Reference in New Issue
Block a user