- 改进 ui 界面
 - 修复流量超出后账号不自动失效问题
 - 修复vless生成的链接不正确问题
 - 修复网页端重启面板功能问题
This commit is contained in:
sprov
2021-06-15 11:10:39 +08:00
parent 5cc4cf02ee
commit e91daabb18
13 changed files with 303 additions and 59 deletions

View File

@@ -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
}