Add version and log

This commit is contained in:
MHSanaei
2023-03-24 17:08:30 +03:30
parent 03a6c131f9
commit a6dfdcdd31
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
}