diff --git a/model/token.go b/model/token.go index 8ce252b2e5..64e52dcd5d 100644 --- a/model/token.go +++ b/model/token.go @@ -28,7 +28,7 @@ func GetAllUserTokens(userId int, startIdx int, num int) ([]*Token, error) { } func SearchUserTokens(userId int, keyword string) (tokens []*Token, err error) { - err = DB.Where("user_id = ?", userId).Where("id = ? or name LIKE ?", keyword, keyword+"%").Find(&tokens).Error + err = DB.Where("user_id = ?", userId).Where("name LIKE ?", keyword+"%").Find(&tokens).Error return tokens, err } diff --git a/web/src/components/TokensTable.js b/web/src/components/TokensTable.js index b63a2b007b..d5d735d778 100644 --- a/web/src/components/TokensTable.js +++ b/web/src/components/TokensTable.js @@ -154,7 +154,7 @@ const TokensTable = () => { icon='search' fluid iconPosition='left' - placeholder='搜索令牌的 ID 和名称 ...' + placeholder='搜索令牌的名称 ...' value={searchKeyword} loading={searching} onChange={handleKeywordChange}