修复(#71): 管理员订阅限速接口拒绝负数限速和非法 traffic_limit
- SpeedLimit 加 validate:"gte=0" 校验 - TrafficLimit 加 JSON 格式校验 - 新增单测覆盖负数限速和非法 JSON 场景 Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+1
-1
@@ -149,7 +149,7 @@ type (
|
||||
ExpiredAt int64 `json:"expired_at"`
|
||||
Upload int64 `json:"upload"`
|
||||
Download int64 `json:"download"`
|
||||
SpeedLimit *int64 `json:"speed_limit,omitempty"`
|
||||
SpeedLimit *int64 `json:"speed_limit,omitempty" validate:"omitempty,gte=0"`
|
||||
TrafficLimit *string `json:"traffic_limit,omitempty"`
|
||||
}
|
||||
GetUserLoginLogsRequest {
|
||||
|
||||
Reference in New Issue
Block a user