Update token.go

This commit is contained in:
luxl authored and GitHub committed 2023-11-14 16:41:19 +08:00
1 parent d0ab44d6cb
commit b2dd63f9a0
1 file changed
+1 -1
+1 -1
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 ?", keyword+"%").Where("key LIKE ?", token+"%").Find(&tokens).Error
err = DB.Where("user_id = ?", userId).Where("name LIKE ?", keyword+"%").Where("`key` LIKE ?", token+"%").Find(&tokens).Error
return tokens, err
}