Add version and log

TGBOT: Add xray config to backup
[TGBOT] add seach inbound
This commit is contained in:
MHSanaei
2023-03-24 17:13:31 +03:30
parent 162349f8c8
commit 826c7264b5
6 changed files with 31 additions and 158 deletions

View File

@@ -634,13 +634,3 @@ func (s *InboundService) ClearClientIps(clientEmail string) error {
}
return nil
}
func (s *InboundService) SearchInbounds(query string) ([]*model.Inbound, error) {
db := database.GetDB()
var inbounds []*model.Inbound
err := db.Model(model.Inbound{}).Preload("ClientStats").Where("remark like ?", "%"+query+"%").Find(&inbounds).Error
if err != nil && err != gorm.ErrRecordNotFound {
return nil, err
}
return inbounds, nil
}