fix: expose user subscription speed override
This commit is contained in:
@@ -75,8 +75,12 @@ func buildUserSubscribeListItem(item *user.SubscribeDetails, groupName string) t
|
||||
sub.Short, _ = tool.FixedUniqueString(item.Token, 8, "")
|
||||
sub.NodeGroupId = item.NodeGroupId
|
||||
sub.NodeGroupName = groupName
|
||||
sub.SpeedLimit = item.SpeedLimit
|
||||
if item.TrafficLimit != nil && *item.TrafficLimit != "" {
|
||||
_ = json.Unmarshal([]byte(*item.TrafficLimit), &sub.TrafficLimit)
|
||||
}
|
||||
if item.Subscribe != nil {
|
||||
sub.PlanSpeedLimit = item.Subscribe.SpeedLimit
|
||||
}
|
||||
return sub
|
||||
}
|
||||
|
||||
@@ -3694,7 +3694,9 @@ type UserSubscribe struct {
|
||||
Traffic int64 `json:"traffic"`
|
||||
Download int64 `json:"download"`
|
||||
Upload int64 `json:"upload"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
TrafficLimit []TrafficLimit `json:"user_traffic_limit"`
|
||||
PlanSpeedLimit int64 `json:"plan_speed_limit"`
|
||||
Token string `json:"token"`
|
||||
Status uint8 `json:"status"`
|
||||
EntitlementSource string `json:"entitlement_source"`
|
||||
|
||||
Reference in New Issue
Block a user