修复令牌bug

This commit is contained in:
CaIon
2023-11-10 00:46:17 +08:00
parent f01932dc34
commit e3fca11f99
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,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 ? or key LIKE ?", keyword+"%", token+"%").Find(&tokens).Error
err = DB.Where("user_id = ?", userId).Where("name LIKE ?", keyword+"%").Where("key LIKE ?", token+"%").Find(&tokens).Error
return tokens, err
}