Revert "Add version and log"

This reverts commit 826c7264b5.
This commit is contained in:
MHSanaei
2023-03-24 17:14:26 +03:30
parent 826c7264b5
commit 9c0718bc44
6 changed files with 158 additions and 31 deletions
+10
View File
@@ -634,3 +634,13 @@ 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
}