mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-21 08:15:48 +00:00
0.1.0
- 改进 ui 界面 - 修复流量超出后账号不自动失效问题 - 修复vless生成的链接不正确问题 - 修复网页端重启面板功能问题
This commit is contained in:
@@ -102,12 +102,12 @@ func (s *InboundService) AddTraffic(traffics []*xray.Traffic) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s *InboundService) DisableInvalidInbounds() (bool, error) {
|
||||
func (s *InboundService) DisableInvalidInbounds() (int64, error) {
|
||||
db := database.GetDB()
|
||||
result := db.Model(model.Inbound{}).
|
||||
Where("up + down >= total and total > 0 and enable = ?", true).
|
||||
Update("enable", false)
|
||||
err := result.Error
|
||||
count := result.RowsAffected
|
||||
return count > 0, err
|
||||
return count, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user