fix: try to fix pgsql #682

This commit is contained in:
CalciumIon committed 2024-12-31 02:10:19 +08:00
1 parent e0b7300239
commit 0a845ae69f
4 files changed
+2 -18

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ func SearchUserTokens(userId int, keyword string, token string) (tokens []*Token
if token != "" {
token = strings.Trim(token, "sk-")
}
err = DB.Where("user_id = ?", userId).Where("name LIKE ?", "%"+keyword+"%").Where("`key` LIKE ?", "%"+token+"%").Find(&tokens).Error
err = DB.Where("user_id = ?", userId).Where("name LIKE ?", "%"+keyword+"%").Where(keyCol+" LIKE ?", "%"+token+"%").Find(&tokens).Error
return tokens, err
}