fix(token-search): use TrimPrefix for sk- token normalization

This commit is contained in:
RedwindA
2026-02-12 15:12:49 +08:00
parent 197b89ea58
commit 091a7611b1

View File

@@ -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-")
}
// 超量用户(令牌数超过上限)只允许精确搜索,禁止模糊搜索