🐛 Fix search account query
This commit is contained in:
parent
57b4b314fe
commit
e97f3b6047
@ -69,7 +69,7 @@ func LookupAccount(probe string) (models.Account, error) {
|
||||
func SearchAccount(probe string) ([]models.Account, error) {
|
||||
probe = "%" + probe + "%"
|
||||
var accounts []models.Account
|
||||
if err := database.C.Where("name LIKE ? OR nick LIKE ?", probe).Find(&accounts).Error; err != nil {
|
||||
if err := database.C.Where("name LIKE ? OR nick LIKE ?", probe, probe).Find(&accounts).Error; err != nil {
|
||||
return accounts, err
|
||||
}
|
||||
return accounts, nil
|
||||
|
Loading…
Reference in New Issue
Block a user