mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 00:44:31 +00:00
Merge pull request #2928 from RedwindA/fix/token-Search
fix(token-search): use TrimPrefix for sk- token normalization
This commit is contained in:
@@ -113,7 +113,7 @@ func SearchUserTokens(userId int, keyword string, token string, offset int, limi
|
||||
}
|
||||
|
||||
if token != "" {
|
||||
token = strings.Trim(token, "sk-")
|
||||
token = strings.TrimPrefix(token, "sk-")
|
||||
}
|
||||
|
||||
// 超量用户(令牌数超过上限)只允许精确搜索,禁止模糊搜索
|
||||
|
||||
Reference in New Issue
Block a user