refactor(api): remove Ratio field from NodeConfig and related structures
This commit is contained in:
parent
0d1df5f905
commit
0179e9837c
@ -36,7 +36,6 @@ type (
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country"`
|
Country string `json:"country"`
|
||||||
City string `json:"city"`
|
City string `json:"city"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort"`
|
Sort int `json:"sort"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
@ -49,7 +48,6 @@ type (
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country,omitempty"`
|
Country string `json:"country,omitempty"`
|
||||||
City string `json:"city,omitempty"`
|
City string `json:"city,omitempty"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort,omitempty"`
|
Sort int `json:"sort,omitempty"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
@ -59,7 +57,6 @@ type (
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country,omitempty"`
|
Country string `json:"country,omitempty"`
|
||||||
City string `json:"city,omitempty"`
|
City string `json:"city,omitempty"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort,omitempty"`
|
Sort int `json:"sort,omitempty"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
|
|||||||
@ -34,7 +34,6 @@ func (l *CreateServerLogic) CreateServer(req *types.CreateServerRequest) error {
|
|||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
Country: req.Country,
|
Country: req.Country,
|
||||||
City: req.City,
|
City: req.City,
|
||||||
Ratio: req.Ratio,
|
|
||||||
Address: req.Address,
|
Address: req.Address,
|
||||||
Sort: req.Sort,
|
Sort: req.Sort,
|
||||||
Protocols: "",
|
Protocols: "",
|
||||||
|
|||||||
@ -38,7 +38,6 @@ func (l *UpdateServerLogic) UpdateServer(req *types.UpdateServerRequest) error {
|
|||||||
data.Name = req.Name
|
data.Name = req.Name
|
||||||
data.Country = req.Country
|
data.Country = req.Country
|
||||||
data.City = req.City
|
data.City = req.City
|
||||||
data.Ratio = req.Ratio
|
|
||||||
// only update address when it's different
|
// only update address when it's different
|
||||||
if req.Address != data.Address {
|
if req.Address != data.Address {
|
||||||
// query server ip location
|
// query server ip location
|
||||||
|
|||||||
@ -359,7 +359,6 @@ type CreateServerRequest struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country,omitempty"`
|
Country string `json:"country,omitempty"`
|
||||||
City string `json:"city,omitempty"`
|
City string `json:"city,omitempty"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort,omitempty"`
|
Sort int `json:"sort,omitempty"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
@ -1812,7 +1811,6 @@ type Server struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country"`
|
Country string `json:"country"`
|
||||||
City string `json:"city"`
|
City string `json:"city"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort"`
|
Sort int `json:"sort"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
@ -2319,7 +2317,6 @@ type UpdateServerRequest struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Country string `json:"country,omitempty"`
|
Country string `json:"country,omitempty"`
|
||||||
City string `json:"city,omitempty"`
|
City string `json:"city,omitempty"`
|
||||||
Ratio float32 `json:"ratio"`
|
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
Sort int `json:"sort,omitempty"`
|
Sort int `json:"sort,omitempty"`
|
||||||
Protocols []Protocol `json:"protocols"`
|
Protocols []Protocol `json:"protocols"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user